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
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<title>Visite virtuelle : Modification d'utilisateur</title>
</head>
<?php
session_start();
if (!isset($_SESSION['membre']) || !$_SESSION['membre']) {
header("location:index.php");
die();
}
?>
<body>
<?php
require'connect.php';
//récupération de la variable d'URL,
//qui va nous permettre de savoir quel enregistrement modifier
$idUM = $_GET["idUtil"];
//requête SQL:
$rModif = "SELECT *
FROM vv_utilisateur
WHERE id =" . $idUM;
//exécution de la requête:
$exeRM = $dbh->query($rModif);
//affichage des données:
$exeModif = $exeRM->fetchObject();
?>
<form name="insertion" action="exeModif.php" method="POST">
<input type="hidden" name="idModif" value="<?php echo($idUM); ?>">
<table border="0" cellspacing="2" cellpadding="2">
<tr align="center">
<td>Pseudo</td>
<td><input type="text" name="pseudo" value="<?php echo($exeModif->pseudo); ?>"></td>
</tr>
<tr align="center">
<td>Password</td>
<td><input type="text" name="password" value="<?php echo($exeModif->password); ?>"></td>
</tr>
<tr align="center">
<td>Nom</td>
<td><input type="text" name="nom" value="<?php echo($exeModif->nom); ?>"></td>
</tr>
<tr align="center">
<td>Prenom</td>
<td><input type="text" name="prenom" value="<?php echo($exeModif->prenom); ?>"></td>
</tr>
<tr align="center">
<td>Statut</td>
<td><input type="text" name="statut" value="<?php echo($exeModif->statut); ?>"></td>
</tr>
<tr align="center">
<td colspan="2"><input type="submit" value="Modifier"></td>
</tr>
</table>
</form>
</body>
</html> |