-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path12-show.php
26 lines (26 loc) · 823 Bytes
/
12-show.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
<?php
$conn = require '12-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>CRUD</title>
</head>
<body>
<h1>Show User - <?=$user["name"] ?></h1>
<p><strong>Name:</strong> <?=$user["name"] ?></p>
<p><strong>Email:</strong> <?=$user["email"] ?></p>
<p><strong>Information:</strong> <?=$user["info"] ?></p>
<p><a href="12-edit.php?id=<?=$user["id"] ?>">--> Edit <--</a></p>
<p><a href="12-delete.php?id=<?=$user["id"] ?>">--> Delete <--</a></p>
<p><a href="javascript:history.back()"><< Back</a></p>
</body>
</html>