f2
This commit is contained in:
parent
80d489c49d
commit
220b56af85
55
index.php
Normal file
55
index.php
Normal file
@ -0,0 +1,55 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<link rel="Stylesheet" href="style.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<?php
|
||||
|
||||
$conn = new mysqli("localhost", "root", "", "komputery") or die("Błšd");
|
||||
|
||||
$wynik = $conn->query("SELECT * FROM parametry WHERE Id = 1 ");
|
||||
|
||||
echo "<h1>Dane twojego komputera: </h1>";
|
||||
|
||||
if($wynik->num_rows > 0){
|
||||
|
||||
echo "<table>";
|
||||
echo "<tr>";
|
||||
echo "<th>Id</th>";
|
||||
echo "<th>Procesor</th>";
|
||||
echo "<th>Plyta_Glowna</th>";
|
||||
echo "<th>Pamiec_Ram</th>";
|
||||
echo "<th>Dysk</th>";
|
||||
echo "<th>Karta_Graficzna</th>";
|
||||
echo "</tr>";
|
||||
|
||||
while( $wiersz = $wynik->fetch_assoc() ){
|
||||
echo "<tr>";
|
||||
|
||||
echo "<td>" . $wiersz["Id"] . "</td>";
|
||||
echo "<td>" . $wiersz["Procesor"] . "</td>";
|
||||
echo "<td>" . $wiersz["Plyta_Glowna"] . "</td>";
|
||||
echo "<td>" . $wiersz["Pamiec_Ram"] . "</td>";
|
||||
echo "<td>" . $wiersz["Dysk"] . "</td>";
|
||||
echo "<td>" . $wiersz["Karta_Graficzna"] . "</td>";
|
||||
|
||||
echo "</tr>";
|
||||
}
|
||||
|
||||
echo "</table>";
|
||||
|
||||
}else {
|
||||
echo "Nie ma nic w bazie danych";
|
||||
}
|
||||
|
||||
$conn->close();
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</body>
|
||||
</html>
|
20
style.css
Normal file
20
style.css
Normal file
@ -0,0 +1,20 @@
|
||||
body {
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
font-size: 10pt;
|
||||
color: black;
|
||||
background-color: #80B8E8;
|
||||
margin: 6mm;
|
||||
}
|
||||
|
||||
p {
|
||||
text-align: justify;
|
||||
}
|
||||
|
||||
pre, code {
|
||||
font-size: 8pt;
|
||||
}
|
||||
td {
|
||||
border: solid #000 1px;
|
||||
padding: 5px;
|
||||
border-spacing: 25mm;
|
||||
}
|
Loading…
Reference in New Issue
Block a user