Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>Equipment data </title>
- <style>
- table, th, td {
- padding: 5px;
- border: 1px solid black;
- border-collapse: collapse;
- }
- </style>
- </head>
- <body>
- <table>
- <tr>
- <th>Microphone_Audio_Kits</th>
- <th>Microphone_Equip_Condition</th>
- <th>Camera_Kits</th>
- <th>Camera_Equip_Condition</th>
- <th>Lighting_Kits</th>
- <th>Lighting_Equp_Condition</th>
- <th>Monitors_TriPods_Extras</th>
- <th>Monitors_TriPods_Extras_Condition</th>
- </tr>
- <?php
- $conn = mysqli_connect('localhost','root','', 'working');
- if ($conn-> connect_error) {
- die("Connection failed:" .$conn-> connect_error);
- }
- $sql = "SELECT Microphone_Audio_Kits, Microphone_Equip_Condition, Camera_Kits, Camera_Equip_Condition, Lighting_Kits, Lighting_Equp_Condition, Monitors_TriPods_Extras, Monitors_TriPods_Extras_Condition FROM equipment
- ";
- $result = $conn-> query($sql);
- if ($result-> num_rows > 0) {
- while ($row = $result-> fetch_assoc()) {
- echo "<tr><td>".$row['Microphone_Audio_Kits']."</td><td>".$row['Microphone_Equip_Condition']."</td><td>".$row['Camera_Kits']."</td><td>".$row['Camera_Equip_Condition']."</td><td>".$row['Lighting_Kits']."</td><td>".$row['Lighting_Equp_Condition']."</td><td>".$row['Monitors_TriPods_Extras']."</td><td>".$row['Monitors_TriPods_Extras_Condition']."</td></tr>";
- }
- echo "</table>";
- }
- else {
- echo "0 result";
- }
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement