1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| <?php
require_once("connexion.php");
$pdoStat = $objetPdo->prepare('INSERT INTO client VALUES (NULL, :Nom_client,:type_client , :Prenom_client, :Adresse_client, :Ville_client, :Pays_client, :Tel_client, :commentaires_client)');
$pdoStat->bindValue(':Nom_client', $_POST['nom'], PDO::PARAM_STR);
$pdoStat->bindValue(':type_client', $_POST['type'], PDO::PARAM_STR);
$pdoStat->bindValue(':Prenom_client', $_POST['prenom'], PDO::PARAM_STR);
$pdoStat->bindValue(':Adresse_client', $_POST['adresse'], PDO::PARAM_STR);
$pdoStat->bindValue(':Ville_client', $_POST['ville'], PDO::PARAM_STR);
$pdoStat->bindValue(':Pays_client', $_POST['pays'], PDO::PARAM_STR);
$pdoStat->bindValue(':Tel_client', $_POST['tel'], PDO::PARAM_STR);
$pdoStat->bindValue(':commentaires_client', $_POST['commentaires'], PDO::PARAM_STR);
$insertIsok = $pdoStat->execute();
if($insertIsok){
$message = 'le client a ete ajoute dans la bdd';
}
else
{
$message = 'Echec de l insertion';
}
?> |
Partager