-
Notifications
You must be signed in to change notification settings - Fork 128
/
pogoda.php
48 lines (48 loc) · 1.1 KB
/
pogoda.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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Prognoza pogody Wrocław</title>
<link rel="stylesheet" href="styl2.css" />
</head>
<body>
<div id="baner1">
<img src="logo.png" alt="meteo" />
</div>
<div id="baner2">
<h1>Prognoza dla Wrocławia</h1>
</div>
<div id="baner3">
<p>maj, 2019 r.</p>
</div>
<div id="glowny">
<table>
<tr>
<th>DATA</th>
<th>TEMPERATURA W NOCY</th>
<th>TEMPERATURA W DZIEŃ</th>
<th>OPADY [mm/h]</th>
<th>CIŚNIENIE [hPa]</th>
</tr>
<?php
$con = mysqli_connect('localhost', 'root', '', 'prognoza');
$kw = "SELECT * FROM pogoda WHERE miasta_id = 1 ORDER BY data_prognozy ASC;";
$res = mysqli_query($con, $kw);
while($tab = mysqli_fetch_row($res)) {
echo "<tr><td>$tab[2]</td><td>$tab[3]</td><td>$tab[4]</td><td>$tab[5]</td><td>$tab[6]</td></tr>";
}
mysqli_close($con);
?>
</table>
</div>
<div id="lewy">
<img src="obraz.jpg" alt="Polska, Wrocław" />
</div>
<div id="prawy">
<a href="kwerendy.txt">Pobierz kwerendy</a>
</div>
<div id="stopka">
<p>Stronę wykonał: Chriskyy#0181</p>
</div>
</body>
</html>