-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmod2.php
26 lines (23 loc) · 912 Bytes
/
mod2.php
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
<?php
include('connexion.php');
$id=$_POST["id"];
$prenom=$_POST["prenom"];
$nom=$_POST["nom"];
$birthday=$_POST["birthday"];
$gender=$_POST["gender"];
$email=$_POST["email"];
$phone=$_POST["phone"];
$address=$_POST["address"];
$dataset=$_POST["dataset"];
echo "Modification <br>";
if($dataset == ""){
$sql2 = "UPDATE person SET Nom='$nom', Prenom='$prenom', DateN='$birthday', sexe='$gender', email='$email', num='$phone', adr='$address' WHERE ID='$id'";
} else {
$sql2 = "UPDATE person SET Nom='$nom', Prenom='$prenom', DateN='$birthday', sexe='$gender', email='$email', num='$phone', adr='$address', dataset='$dataset' WHERE ID='$id'";
}
if($result2 = $db->query($sql2) === TRUE){
echo "<p'>Enregistrer </p><br>";
echo "<a href='menu.html'>Continuer";
} else {
echo "Error Modification </p><br>" . $db->error; }
?>