Advertisement
Guest User

Untitled

a guest
May 24th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 KB | None | 0 0
  1. <?php
  2.  
  3.                     $sql = "SELECT id_book, tytul, autor, wydawnictwo, ilosc, rok_wydania FROM books";
  4.                     $result = $conn->query($sql);
  5.  
  6.  
  7.                     echo '<select name="produkt">';
  8.  
  9.                     while($row = mysqli_fetch_assoc($result)) {
  10.  
  11.                         echo '<option value="' . $row['id_book'] . '">' . $row['tytul'] . '</option>';
  12.  
  13.  
  14.                         echo '</select>';
  15.  
  16.  
  17.                         echo '<form action="wypozycz2.php" method="post">';
  18.                         echo '<input type="hidden" value="' . $row['id_book'] . '" name="id_book">';
  19.                         echo '<input type="hidden" value="' . @$_POST['id_czytelnika'] . '" name="id_czytelnika">';
  20.                         echo '<td class="alignCenter"><button type="submit"  class="buttonType1 loginSuccessful" value="">Wypożycz</td>';
  21.                         echo '</form>';
  22.                         }
  23.                     ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement