1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| function ajouter_personnel($idfonction, $idstructure, $nompersonnel, $prenompersonnel, $mailpersonnel, $numeropersonnel, $bureaupersonnel, $ordre)
{
global $bdd;
try{
$reponse = $bdd->prepare("INSERT INTO personnel (idfonction, idstructure, nompersonnel, prenompersonnel, mailpersonnel, numeropersonnel, bureaupersonnel, ordre) VALUES (:fonction, :structure, :nom, :prenom, :mail, :num, :bureau, :ordre)");
$reponse -> execute(array(':fonction'=>$idfonction,':structure'=>$idstructure,':nom'=>$nompersonnel,':prenom'=>$prenompersonnel,':mail'=>$mailpersonnel,':num'=>$numeropersonnel,':bureau'=>$bureaupersonnel,':ordre'=>$ordre));
$reponse -> closeCursor();
//
return true;
}catch (Exception $e)
{
die('Erreur : ' . $e->getMessage());
return false;
}
} |
Partager