-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path09-show.php
More file actions
24 lines (24 loc) · 747 Bytes
/
09-show.php
File metadata and controls
24 lines (24 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
$conn = require '09-connection.php';
$id = $_GET["id"];
$stmt = $conn->prepare("SELECT * FROM users WHERE id = ?");
$stmt->bind_param("i", $id);
$stmt->execute();
$result = $stmt->get_result();
$user = $result->fetch_assoc();
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>User - <?=$user["name"] ?></title>
</head>
<body>
<p><strong>Name:</strong> <?=$user["name"] ?></p>
<p><strong>Email:</strong> <?=$user["email"] ?></p>
<p><a href="09-edit.php?id=<?=$user["id"] ?>">--> Edit <--</a></p>
<p><a href="09-delete.php?id=<?=$user["id"] ?>">--> Delete <--</a></p>
<p><a href="javascript:history.back()"><< Back</a></p>
</body>
</html>