Advertisement
sueckreimir

dvorane/index

Sep 24th, 2019
298
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.08 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <!--
  3. To change this license header, choose License Headers in Project Properties.
  4. To change this template file, choose Tools | Templates
  5. and open the template in the editor.
  6. -->
  7. <html>
  8.     <head>
  9.         <meta charset="UTF-8">
  10.         <title></title>
  11.     </head>
  12.     <body>
  13.         <?php
  14.        
  15.         require 'konekcija.php';
  16.        
  17.         echo '<table border="2">';
  18.         echo '<tr><th>'.' '.'<th>'.'Dvorana'.'<th>'.'Kapacitet'.'<tr>';
  19.        
  20.         $query="select oznDvorana, kapacitet
  21.        from dvorana";
  22.         $result= mysqli_query($link, $query);
  23.        
  24.         $x=0;
  25.         while($row= mysqli_fetch_assoc($result))
  26.         {
  27.             $x=$x+1;
  28.             $dvorana='<a href="rezervacija.php?dvorana='.$row['oznDvorana']
  29.             .'">'.$row['oznDvorana'].'</a>';
  30.            
  31.             echo '<tr><td>'.$x.'<td>'.
  32.                             $dvorana.'<td>'.
  33.                             $row['kapacitet'].'<tr>';
  34.         }
  35.        
  36.        
  37.         echo '</table>';
  38.        
  39.        
  40.         ?>
  41.     </body>
  42. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement