Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $conn = pg_connect("host=db.dcs.aber.ac.uk port=5432 dbname=teaching user=csguest password=*");
- $db = pg_query ($conn, "select * from CSGames ORDER BY refnumber");
- echo "<table border='1'>";
- echo "<td>Order?</td> <td>Games</td> <td>Platform</td> <td>Description</td> <td>Price</td>";
- if (!$conn)
- {
- die('Error connecting to Database: ' . pg_error());
- }
- while ($a = pg_fetch_array ($db))
- {
- echo "<tr>";
- echo "<td><input type='checkbox' name="select[$a['refnumber']]"</td>";
- echo "<td>" . $a["title"] . "</td>";
- echo "<td>" . $a["platform"] . "</td>";
- echo "<td>" . $a["description"] . "</td>";
- echo "<td>£" . $a["price"] . "</td>";
- echo "</tr>";
- }
- echo "</table>\n";
- ?>
Add Comment
Please, Sign In to add comment