Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html lang="pl">
- <head>
- <meta charset="utf-8">
- </head>
- <body>
- <?php
- $server = 'localhost';
- $user = 'root';
- $pass = '';
- $db ='firma';
- $conn=new mysqli($server, $user, $pass, $db);
- if($wynik = $conn->query("SELECT * FROM pracownicy")){
- if($wynik->num_rows > 0){
- echo "<table border='1' cellpadding='10'>";
- echo "<tr><th>ID</th><th>Imie</th><th>Nazwisko</th><th>Placa</th><th>Stanowisko_id</th><th>Pesel</th></tr>";
- while($record = $wynik->fetch_object()){
- echo "<tr>";
- echo "<td>" . $record->id. "</td>";
- echo "<td>" . $record->imie. "</td>";
- echo "<td>" . $record->nazwisko. "</td>";
- echo "<td>" . $record->placa. "</td>";
- echo "<td>" . $record->stanowisko_id. "</td>";
- echo "<td>" . $record->pesel. "</td>";
- echo "</tr>";
- }
- echo "</table>";
- } else {
- echo "Brak rekordów";
- }
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement