1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| <?php
include('include/cnx-bdd.php');
if(isset($_POST['envoyer'])) {
if((!empty($_POST['nom'])) AND (!empty($_POST['prenom'])) AND (!empty($_POST['tel'])) AND (!empty($_POST['email'])) AND (!empty($_POST['ma_liste'])) AND (!empty($_POST['sexe'])) AND (!empty($_POST['monfichier'])) AND (!empty($_POST['username'])) AND (!empty($_POST['password'])) AND (!empty($_POST['repeatpassword']))){
if($_POST['password'] == $_POST['repeatpassword'] ){
$ins = $bdd->prepare('INSERT INTO membre (nom,prenom,tel,email,filier,sexe,fichier,username,password) VALUES (?,?,?,?,?,?,?,?,?)');
$ins->execute(array($_POST['nom'],$_POST['prenom'],$_POST['tel'],$_POST['email'],$_POST['ma_liste'],$_POST['sexe'],$_POST['monfichier'],$_POST['username'],$_POST['password']));
header('location:index.php');
}
else{
echo ' <strong><p style="color:red">*veuillez verfier votre password </p></strong>';
}
}
else {
echo 'veuillez remplie tout les champs ';
}
}
?> |
Partager