Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //make connection
- $con = mysqli_connect('csmysql.cs.cf.ac.uk', 'c1414295', 'enyiz5', 'items');
- $sql = "SElECT * FROM items";
- $records = mysqli_query($con, $sql);
- ?>
- <html>
- <head>
- <title>title</title>
- </head>
- <body>
- <table width="600" border="1" cellpadding="1" cellspacing="1">
- <tr>
- <th>ID</th>
- <th>Name</th>
- <th>Price</th>
- <th>Description</th>
- <th>Picture</th>
- </tr>
- <?php
- while($items=mysqli_fetch_assoc($records)){
- echo "<tr>";
- echo "<td>".$items['ID']."</td>";
- echo "<td>".$items['Name']."</td>";
- echo "<td>".$items['Price']."</td>";
- echo "<td>".$items['Description']."</td>";
- echo "<td>".$items['Picture']."</td>";
- echo "</tr>";
- }//end while
- ?>
- </table>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement