Esempio n. 1
0
function creerUtilisateur($nom, $prenom, $id, $adresse, $codePostal, $ville, $date)
{
    $cnx = connexion::connecter();
    $query = "insert into visiteur(`id`, `nom`, `prenom`, `adresse`, `cp`, `ville`, `dateEmbauche`,) values (:id, :nom, :prenom, :adresse, :cp, :ville, :dateEmbauche)";
    $req = $cnx->prepare($query);
    $req->bindParam(':id', $id, PDO::PARAM_STR, 100);
    $req->bindParam(':nom', $nom, PDO::PARAM_STR, 100);
    $req->bindParam(':prenom', $prenom, PDO::PARAM_STR, 100);
    $req->bindParam(':adresse', $adresse, PDO::PARAM_STR, 100);
    $req->bindParam(':cp', $codePostal, PDO::PARAM_STR, 100);
    $req->bindParam(':ville', $ville, PDO::PARAM_STR, 100);
    $req->bindParam(':dateEmbauche', $date, PDO::PARAM_STR, 100);
    return $req->execute();
}