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 31 32 33 34 35 36 37 38 39 40 41
| <?php
if (isset($_POST['Modifier']))
{
try
{
include("connection_BICF_bd.php");
/*cette requètte permet de modifier les infos sur l'agent */
$req = $bdd->exec("UPDATE agents SET (
nom_agt = ".$_POST['nom'].",
pre_agt = " . $_POST['prenom'] .",
date_nais_agt = " . $_POST['datnaiss'] .",
lieu_nais_agt = " . $_POST['lieunaiss'] .",
adres_agt = " . $_POST['adresse'] .",
cnt_agt = " . $_POST['contact'] .",
email_agt= = " . $_POST['email'] .",
pseudo_agt= = " . $_POST['pseudo'] .",
res_agt= = " . $_POST['residence'] .",
mot_passe_agt= = " . $_POST['mot_passe'] .",
img_agt= = " . $_POST['image'] .",
sexe_agt= = " . $_POST['sexe'] .",
sit_mat_agt= = " . $_POST['situation_m'] .",
nationalite= = " . $_POST['nationalite'] .",
date_pris_fonc= = " . $_POST['date_pris_fonc'] .",
diplome= = " . $_POST['diplome'] .",
service= = " . $_POST['service'] .",
fonction= = " . $_POST['fonction'] ."
WHERE num_agt = " . $_POST['num_caché'] .")");
echo "<script langage='javascript'>alert('modification terminée avec succès ...');</script>";
}
catch(Exception $e)
{
die('Erreur:'.$e->getMessage());
}
$req->closeCursor();
}
?> |
Partager