-
Notifications
You must be signed in to change notification settings - Fork 0
/
modif2.php
executable file
·64 lines (57 loc) · 1.91 KB
/
modif2.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php require_once("config.php");
$id = $_GET["idPersonne"] ;
$user_name = $bdd -> prepare('SELECT prenom, nom, email, age, telephone FROM membres WHERE id = '.$id);
$user_name -> execute();
$result = $user_name -> fetch();
?>
<html>
<head>
<meta charset="utf-8" />
<title>Home Switch Home</title>
<link href="http://fonts.googleapis.com/css?family=Oxygen:400,700,300" rel="stylesheet" />
<link href="style.css" rel="stylesheet" />
</head>
<body>
<?php include("header.php"); ?>
<div id="wrapper">
<div id="user_list">
<?php
$verifadmin = $bdd -> prepare("SELECT admin FROM membres WHERE id =".$_SESSION["userID"]);
$verifadmin -> execute();
$numadmin = $verifadmin->fetch();
if ($numadmin['admin'] == 1){
?>
<form name="insertion" action="modif3.php" method="POST">
<input type="hidden" name="id" value="<?php echo($id) ;?>">
<table border="0" align="center" cellspacing="2" cellpadding="2">
<tr align="center">
<td>Nom</td>
<td><input type="text" name="nom" value="<?php echo($result['nom']) ;?>"></td>
</tr>
<tr align="center">
<td>Prenom</td>
<td><input type="text" name="prenom" value="<?php echo($result['prenom']) ;?>"></td>
</tr>
<tr align="center">
<td>E-mail</td>
<td><input type="text" name="email" value="<?php echo($result['email']) ;?>"></td>
</tr>
<tr align="center">
<td>Age</td>
<td><input type="text" name="age" value="<?php echo($result['age']) ;?>"></td>
</tr>
<tr align="center">
<td>Télephone</td>
<td><input type="text" name="telephone" value="<?php echo($result['telephone']) ;?>"></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" value="modifier"></td>
</tr>
</table>
</form>
<?php } ?>
</div>
</div>
<?php include("footer.php");?>
</body>
</html>