-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmodif3.php
49 lines (43 loc) · 1.21 KB
/
modif3.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php require_once("config.php"); ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Home Switch Home</title>
<link href="style.css" rel="stylesheet" />
</head>
<body>
<?php include("header.php"); ?>
<div id="wrapper">
<div id="user_list">
<?php
//nom:
$nom = $_POST["nom"] ;
//prenom:
$prenom = $_POST["prenom"] ;
//email:
$email = $_POST["email"] ;
//age:
$age = $_POST["age"] ;
$telephone = $_POST["telephone"];
//récupération de l'identifiant de la personne:
$id = $_POST["id"] ;
//création de la requête SQL:
/*$modifsql = " UPDATE membres
SET nom = '$nom',
prenom = '$prenom',
email = '$email',
age = '$age',
WHERE id = '$id' " ;
$envoimodif = $bdd -> prepare('$modifsql');
//exécution de la requête SQL:
$envoimodif -> execute();*/
$envoimodif = $bdd -> prepare("UPDATE membres SET nom = '$nom', prenom = '$prenom', email = '$email', age = '$age', telephone = '$telephone' WHERE id = '$id' ");
$envoimodif -> execute();
?>
<a href="modif1.php"> Retour page administration</a>
</div>
</div>
<?php include("footer.php");?>
</body>
</html>