-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathairport.php
More file actions
54 lines (52 loc) · 1.81 KB
/
Copy pathairport.php
File metadata and controls
54 lines (52 loc) · 1.81 KB
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
<!DOCTYPE html>
<html lang="pl">
<head>
<link rel="stylesheet" href="styl6.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Odloty samolotów</title>
</head>
<body>
<header>
<section>
<h2>Odloty z lotniska</h2>
</section>
<section>
<img src="zad6.png" alt="logotyp" srcset="">
</section>
</header>
<main>
<h4>tabela odltów</h4>
<table>
<tr><td>lp.</td><td>numer rejsu</td><td>czas</td><td>kierunek</td><td>status</td></tr>
<?php
$polacz = new mysqli("localhost", "root", "", "egzamin 06_20.01");
$query = "SELECT id, nr_rejsu,czas,kierunek, status_lotu FROM odloty order by czas DESC";
$wynik = $polacz->query($query);
while($row = $wynik->fetch_array()){
echo "<tr><td>".$row['id']."</td><td>".$row['nr_rejsu']."</td><td>".$row['czas']."</td><td>".$row['kierunek']."</td><td>".$row['status_lotu']."</td></tr>";
}
mysqli_close($polacz);
?>
</table>
</main>
<footer>
<section>
<a href="kw1.png">Pobierz obraz</a>
</section>
<section>
<?php
if(isset($_COOKIE['ciastko'])) {
echo "<p><b>Miło nam, że nas znowu odwiedziłeś</b></p>";
} else {
setcookie("ciastko", "1", time()+3600*1);
echo "<p><i> Dzień dobry! Sprawdź regulamin naszej strony </i></p>";
}
?>
</section>
<section>
Autor:PESEL
</section>
</footer>
</body>
</html>