Beispiel #1
0
<!DOCTYPE >
<head>
	<meta charset="utf-8">
	<?php 
if (!isset($_GET['id'])) {
    echo "<meta HTTP-EQUIV='refresh' CONTENT='0;URL=/Bleez/ListaUsuario.php'>";
}
?>
</head>
<body>
<?php 
require "BancoDeDados.php";
$bd = new BancoDeDados();
$usuario = $bd->DBRead('usuario', "id = {$_GET['id']}");
foreach ($usuario as $key => $value) {
    $dados = $value;
}
echo "<form method='POST' action='*'>";
echo "<p><label for='nome'>Nome:</label><input type='text' name='nome' value='" . $dados['nome'] . "' disabled/></p>";
echo "<p><label for='email'>Email:</label><input type='email' name='email' value='" . $dados['email'] . "' disabled/></p>";
echo "<p><label for='data_nascimento'>Data de nascimento:</label><input type='date' name='data_nascimento' value='" . $dados['data_nascimento'] . "' disabled/></p>";
echo "<input  type='hidden' name='user' value='cadastra' />";
echo "<input type='submit' value='Deleta' action='" . $bd->DBDeleta('usuario', "id = '" . $dados['id'] . "'") . "'/>";
echo "</form>";
?>
</body>