connect_error) { die("Connection failed: " . $conn->connect_error); }else { echo "Connected successfully"; }*/ ?>
Je m\'inscris à l\'intervention théatrale proposée par le SMPE :
ouiVous devez confirmer votre présence
'; $error =1; } if ($error==1) { echo $form; } else { //********nouvelle requete PDO******** try { // set the PDO error mode to exception $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); // prepare sql and bind parameters $stmt = $conn->prepare("INSERT INTO inscription (nom, prenom, mail, evenement, telephone, entite, adresse, cp, ville, champ1, champ2, champ3, champ4 ) VALUES (:nom, :prenom, :mail, :evenement, :telephone, :entite, :adresse, :cp, :ville, :champ1, :champ2, :champ3, :champ4 )"); $stmt->bindParam(':nom', $nom); $stmt->bindParam(':lastname', $lastname); $stmt->bindParam(':email', $email); $stmt->bindParam(':evenement', $evenement); $stmt->bindParam(':telephone', $telephone); $stmt->bindParam(':entite', $entite); $stmt->bindParam(':adresse', $adresse); $stmt->bindParam(':cp', $cp); $stmt->bindParam(':ville', $ville); $stmt->bindParam(':champ1', $champ1); $stmt->bindParam(':champ2', $champ2); $stmt->bindParam(':champ3', $champ3); $stmt->bindParam(':champ4', $champ4); // insert a row $nom = $_POST['nom']; $prenom = $_POST['prenom']; $mail = $_POST['mail']; $evenement = $_POST['event']; $telephone = $_POST['tel']; $entite = $_POST['entite']; $adresse = $_POST['adresse']; $cp = $_POST['cp']; $ville = $_POST['ville']; $champ1 = $_POST['champ1']; $champ2 = $_POST['champ2']; $champ3 = $_POST['champ3']; $champ4 = $_POST['champ4']; // $stmt->execute(); $stmt->execute(array(':nom' => $nom, ':prenom' => $prenom, ':mail' => $mail, ':evenement' => $evenement, ':telephone' => $telephone, ':entite' => $entite, ':adresse' => $adresse, ':cp' => $cp, ':ville' => $ville, ':champ1' => $champ1, ':champ2' => $champ2, ':champ3' => $champ3, ':champ4' => $champ4 )); echo "Votre réponse a bien été enregistrée.Merci !
Une erreur est survenu lors de votre inscription.
Merci de prendre contact avec la direction de la communication par mail en cliquant ici