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=rohishe"); ?>
- // HINT- switch case to ADD and REMOVE the ID (gets the action)
- // add some statement for your query to work;
- $res = pg_query ($conn, "SELECT refnumber, title, platform, description, price FROM CSGames WHERE refnumber= $id ORDER BY title");
- $a = pg_fetch_array($res);
- echo "<tr>";
- echo "<td class='title'><h3>" . $a['title'] . "</h3><p>". $a['platform'] ."</p></td>";
- echo "<td class='description'>" . $a['description'] . "</td>";
- echo "<td class='price'>£" . $a['price'] . "</td>";
- echo "<td class='quantity'>" . $quantity . "</td>";
- echo "</tr>";
- echo "<td><a class='buttons' href='gameshop.php?action=add&id=" . $a['refnumber'] . "'>Add Quantity</td>";
- echo "<td><a class='buttons' href='gameshop.php?action=remove&id=" . $a['refnumber'] . "'>Remove Quantity</a></td>";
Add Comment
Please, Sign In to add comment