Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $serwer = "localhost";
- $user = "root";
- $pass = "";
- $dbname = "rowerowy";
- $polaczenie = new mysqli($serwer, $user, $pass, $dbname);
- if ($polaczenie->connect_error) {
- die("Connection failed: " . $polaczenie->connect_error);
- }
- $wynik = mysqli_query($polaczenie,"SELECT * FROM rowery");
- if(mysqli_num_rows($wynik) > 0) {
- echo "<table border=1>";
- echo "<tr> <td>ID</td> <td>Producent</td> <td>Model</td> <td>Rozmiar Ramy</td> <td>Rozmiar Kola</td> </tr>";
- while($r = mysqli_fetch_assoc($wynik)) {
- echo "<tr>";
- echo "<td>".$r['Id']."</td>";
- echo "<td>".$r['Producent']."</td>";
- echo "<td>".$r['Model']."</td>";
- echo "<td>".$r['roz_Ramy']." cali</td>";
- echo "<td>".$r['roz_Kola']." cali</td>";
- echo "</tr>";
- }
- echo "</table>";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement