1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| $connect = mysql_connect(getMysqlHost(),getMysqlUser(),getMysqlPass()) or die ("erreur de connexion");
mysql_select_db(getMysqlBase(),$connect) or die ("erreur de connexion base");
$sujet=$_POST['txtSujet'];
$categorie=$_POST['txtCategorie'];
$motcle1=$_POST['txtMotCle1'];
$motcle2=$_POST['txtMotCle2'];
$motcle3=$_POST['txtMotCle3'];
$motcle4=$_POST['txtMotCle4'];
$commentaire = stripslashes($_POST['txtCommentaire']);
$commentaire = mysql_real_escape_string($commentaire);
mysql_query("insert into fichier (nom, extension, sujet, categorie, motcle1, motcle2, motcle3, motcle4, commentaire)
values ('$nom_fichier_sans_extension', '$extension', '$sujet', '$categorie', '$motcle1', '$motcle2', '$motcle3', '$motcle4', '$commentaire')") ; |
Partager