Blame view

sendNews.php 515 Bytes
febd6409   henyxia   News creation done
1
2
3
  <?php
  require_once("creds.php");
  
506cf7ea   henyxia   Security need to ...
4
5
6
  $link = mysql_connect(__MYSQL_HOSTNAME__, __MYSQL_USERNAME__, __MYSQL_PASSWORD__)
  	or die("Impossible de se connecter : " . mysql_error());
  if(!mysql_select_db('crep', $link))
febd6409   henyxia   News creation done
7
  {
506cf7ea   henyxia   Security need to ...
8
9
  	echo 'Selection de la base de donnees impossible';
  	exit;
febd6409   henyxia   News creation done
10
  }
54b6ba84   henyxia   Need to magic quo...
11
  $requete = "INSERT INTO  `crep`.`news` (`pk` ,`fk_author` ,`created` ,`title` ,`content`) VALUES (NULL ,  '2',  CURDATE(), \"".base64_decode($_POST["title"])."\", \"".base64_decode($_POST["content"])."\")";
506cf7ea   henyxia   Security need to ...
12
  $resultat = mysql_query($requete);