-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathszczegoly.php
71 lines (61 loc) · 1.38 KB
/
szczegoly.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
65
66
67
68
69
70
71
<?php
require_once 'funkcje.php';
sprawdzLogowanie();
if (isset($_GET['id'])) {
$pdo = polacz();
$stmt = $pdo->prepare("SELECT * FROM samochody WHERE id = :id");
$stmt->execute(['id' => $_GET['id']]);
$wiersz = $stmt->fetch();
if (!$wiersz) {
die("Nie znaleziono podanego samochodu!");
}
} else {
die("Nie podano parametru!");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Szczegóły</title>
<meta charset="utf-8">
</head>
<body>
<table>
<tr>
<td>Marka</td>
<td><?= $wiersz['marka'] ?></td>
</tr>
<tr>
<td>Model</td>
<td><?= $wiersz['model'] ?></td>
</tr>
<tr>
<td>Rok</td>
<td><?= $wiersz['rok'] ?></td>
</tr>
<tr>
<td>Pojemność</td>
<td><?= $wiersz['pojemnosc'] ?></td>
</tr>
<tr>
<td>Typ silnika</td>
<td><?= $wiersz['typ_silnika'] ?></td>
</tr>
<tr>
<td>Liczba poduszek</td>
<td><?= $wiersz['liczba_poduszek'] ?></td>
</tr>
<tr>
<td>ABS</td>
<td><?= $wiersz['abs'] ?></td>
</tr>
<tr>
<td>ESP</td>
<td><?= $wiersz['esp'] ?></td>
</tr>
</table>
<p>
<a href="index.php">[ Powrót do listy ]</a>
</p>
</body>
</html>