{$pseudo=htmlentities($_POST['pseudo']);
$mot_de_passe=htmlentities($_POST['mot_de_passe']);
$mot_de_passe_verif=htmlentities($_POST['mot_de_passe_verif'],ENT_QUOTES);
$prenom=htmlentities($_POST['prenom'],ENT_QUOTES); //empêcher le html et remplacer les ' par "
$nom=htmlentities($_POST['nom'],ENT_QUOTES);
$e_mail=htmlentities($_POST['e_mail'],ENT_QUOTES);
$adresse=htmlentities($_POST['adresse'],ENT_QUOTES);
$ville=htmlentities($_POST['ville'],ENT_QUOTES);
$arr=htmlentities($_POST['arr'],ENT_QUOTES);
$dpt=htmlentities($_POST['dpt'],ENT_QUOTES);
$tel=htmlentities($_POST['tel'],ENT_QUOTES);
$instrument=htmlentities($_POST['instrument'],ENT_QUOTES);
$autre=htmlentities($_POST['autre'],ENT_QUOTES);
$niveau=htmlentities($_POST['niveau'],ENT_QUOTES);
$parcours=htmlentities($_POST['parcours'],ENT_QUOTES);
$parcours=nl2br($parcours); //enlever les br/
$age=htmlentities($_POST['age'],ENT_QUOTES);
mysql_connect(...); //connection à la base amitie_
mysql_select_db("...");
mysql_query ("INSERT INTO membres (id,prenom,nom,e_mail,adresse,ville,arr,dpt,tel,instrument,autre,niveau,parcours,age,pseudo,mot_de_passe,mot_de_passe_verif )
VALUES ('','$prenom','$nom','$e_mail','$adresse','$ville',
'$arr','$dpt','$tel','$instrument','$autre','$niveau','$parcours','$age','$pseudo','$mot_de_passe','$mot_de_passe_verif')");
mysql_close ();
Partager