Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $conn = pg_connect("host=x.dcs.x.ac.uk port=5432 dbname=teaching user=x password=x");
- echo "<table border='1'> <tr><th>ID#</th><th>Title</th><th>Platform</th><th>Description</th><th>Price (£)</th><th>User</th></tr>";
- foreach($_SESSION["productSelected"] as $id){
- $res = pg_query ($conn, "select * from CSGames WHERE refnumber='$id' order by refnumber");
- while ($a = pg_fetch_row($res))
- {
- echo "<tr>";
- for ($j = 0; $j < pg_num_fields($res); $j++)
- {
- echo "<td>" . $a[$j] . "</td>";
- }
- echo "</tr>";
- $total += $id['price'];
- }
- }
- echo "</table>";
- echo $total;
Add Comment
Please, Sign In to add comment