SHARE
TWEET

Untitled

a guest Jan 26th, 2020 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2.     <head>
  3.     </head>
  4.     <body>
  5.         <?php
  6.         include "menu.php";
  7.         include "prisijungti.php";
  8.  
  9.  
  10. ?>
  11.  
  12.  
  13.   <div class="container">
  14.   <h2>Parduotuves duomenys</h2>
  15.    <table class="table">
  16.     <thead class="thead-dark">
  17.       <tr>
  18.         <th>Pirkejo Numeris</th>
  19.         <th>Prekes Numeris</th>
  20.         <th>Data, kada nupirkta preke</th>
  21.       </tr>
  22.     </thead>
  23.     <tbody>
  24.  
  25.  
  26.  
  27.  
  28.     <?php $sql = "SELECT * FROM Pirkejai";
  29.         $result = $conn->query($sql);
  30.  
  31.        
  32.         if ($result->num_rows > 0)
  33.         { echo'<select>';
  34.             // output data of each row
  35.             while($row = $result->fetch_assoc())
  36.             {
  37.                 echo '<option value='.$row["ID"].'>'.$row["Vardas"].' '.$row["Pavarde"].'</option>';
  38.  
  39.              /*echo "<tr>";
  40.                 echo "<td>".$row["Pirkejo_Numeris"]."</td>";
  41.                 echo "<button type='button' class='btn btn-primary'>Redaguoti</button>";
  42.                 echo "</tr>";*/
  43.             }
  44.            echo'</select>';
  45.         }  
  46.          
  47.         else
  48.         {
  49.         echo "0 results";
  50.         }
  51.      
  52.         $conn->close();
  53.         ?>  </tbody>
  54.         </table>
  55.       </div>
  56.     </body>
  57. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top