Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- </head>
- <body>
- <?php
- include "menu.php";
- include "prisijungti.php";
- ?>
- <div class="container">
- <h2>Parduotuves duomenys</h2>
- <table class="table">
- <thead class="thead-dark">
- <tr>
- <th>Pirkejo Numeris</th>
- <th>Prekes Numeris</th>
- <th>Data, kada nupirkta preke</th>
- </tr>
- </thead>
- <tbody>
- <?php $sql = "SELECT * FROM Pirkejai";
- $result = $conn->query($sql);
- if ($result->num_rows > 0)
- { echo'<select>';
- // output data of each row
- while($row = $result->fetch_assoc())
- {
- echo '<option value='.$row["ID"].'>'.$row["Vardas"].' '.$row["Pavarde"].'</option>';
- /*echo "<tr>";
- echo "<td>".$row["Pirkejo_Numeris"]."</td>";
- echo "<button type='button' class='btn btn-primary'>Redaguoti</button>";
- echo "</tr>";*/
- }
- echo'</select>';
- }
- else
- {
- echo "0 results";
- }
- $conn->close();
- ?> </tbody>
- </table>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement