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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
| <?php
if (isset($_POST['Modifier']))
{
try
{
include("connection_BICF_bd.php");
// On affecte les valeurs des champs imput aux variables
$nom = $_POST['nom'];
$prenom = $_POST['prenom'];
$datnaiss = $_POST['datnaiss'];
$lieunaiss = $_POST['lieunaiss'];
$adresse = $_POST['adresse'];
$contact = $_POST['contact'];
$email = $_POST['email'];
$pseudo = $_POST['pseudo'];
$residence = $_POST['residence'];
$mot_passe = $_POST['mot_passe'];
$image = $_POST['image'];
$sexe = $_POST['sexe'];
$situation_m = $_POST['situation_m'];
$nationalite = $_POST['nationalite'];
$date_pris_fonc = $_POST['date_pris_fonc'];
$diplome = $_POST['diplome'];
$service = $_POST['service'];
$fonction = $_POST['fonction'];
$num_caché = $_POST['num_caché'];
echo $prenom;
$req = $bdd->exec('UPDATE agents SET
nom_agt = "$nom",
pre_agt = "$prenom",
date_nais_agt = "$datnaiss",
lieu_nais_agt = "$lieunaiss",
adres_agt = "$adresse",
cnt_agt = "$contact",
email_agt = "$email",
pseudo_agt = "$pseudo",
res_agt = "$residence",
mot_passe_agt = "$mot_passe",
img_agt = "$image",
sexe_agt = "$sexe",
sit_mat_agt = "$situation_m",
nationalite = "$nationalite",
date_pris_fonc = "$date_pris_fonc",
diplome = "$diplome",
service = "$service",
fonction = "$fonction"
WHERE num_agt = "$num_caché"');
echo "<script langage='javascript'>alert('modification terminée avec succès ...');</script>";
}
catch(Exception $e)
{
die('Erreur:'.$e->getMessage());
}
}
?> |
Partager