Advertisement
Guest User

Untitled

a guest
Sep 30th, 2019
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.00 KB | None | 0 0
  1. <?php
  2.  
  3. echo '<h2>Reklamacje</h2><br>';
  4.  
  5. $db = new mysqli("localhost", "root", "123qwe", "sth");
  6. $result = $db->query("SELECT * from guitars");
  7.  
  8.     if ($result->num_rows != 0) {
  9.         echo '
  10.        <table>
  11.            <thead>
  12.                <th><strong>Lp.</strong></th>
  13.                <th><strong>Zlecenie</strong></th>
  14.                <th><strong>Nr<br>serwis</strong></th>
  15.                <th><strong>Status</strong></th>
  16.                <th><strong>Imię i nazwisko</strong></th>
  17.                <th><strong>Nazwa instrumentu<br>/rodzaj usługi</strong></th>
  18.                <th><strong>Data<br>realizacji</strong></th>
  19.                <th><strong>Telefon</strong></th>
  20.                <th><strong>Koszt<br>PLN</strong></th>
  21.                <th colspan="3"><strong>Zmiany</strong></th>
  22.            </thead>
  23.            <tbody>
  24.        ';
  25.  
  26.         while($row = $result->fetch_assoc()) {
  27.             echo '
  28.            <tr>
  29.                <td align="center"></td>
  30.                <td align="center">'.$row["ID"].'</td>
  31.                <td align="center">'.$row['Zlecenie'].'</td>
  32.                <td align="center">'.$row['Status'].'</td>
  33.                <td align="center">'.$row['Imie'].' '.$row['Nazwisko'].'</td>
  34.                <td align="center">'.$row['Nazwa'].'</td>
  35.                <td align="center">'.$row['Data_realizacji'].'</td>
  36.                <td align="center">'.$row['Telefon'].'</td>
  37.                <td align="center">'.$row['Koszt'].'</td>
  38.                <td align="center">
  39.                    <a href="edit.php?ID='.$row['ID'].'">Edytuj</a>
  40.                </td>
  41.                <td align="center">
  42.                    <a href="serwis.php?ID='.$row['ID'].'">Pre<br>serwis</a>
  43.                </td>
  44.                <td align="center">
  45.                    <a href="serwis2.php?ID='.$row['ID'].'">Post<br>serwis</a>
  46.                </td>
  47.            </tr>';
  48.  
  49.             $count++;
  50.         }
  51.  
  52.         echo '
  53.            </tbody>
  54.        </table>
  55.        ';
  56.     }
  57. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement