55 lines
1.2 KiB
PHP
55 lines
1.2 KiB
PHP
|
<!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<EFBFBD><EFBFBD>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>
|