Dysan
11-23-2007, 06:43 AM
How do I display the products, upon clicking the link contained in the writeShoppingCart() function?
Also, upon executing the 'add' case within the switch statement, how do I also display the products?
The products should also get displayed if the user manually enters the .php file, via entering the file path into their browsers address bar. How do I do this?
<?php
function writeShoppingCart()
{
echo "Shopping Cart: ".'<a href="test.php">'. "1 Items".'</a>';
}
writeShoppingCart();
$id = $_GET['id'];
$action = $_GET['action'];
switch ($action)
{
case 'add':
break;
}
echo "PRODUCTS:";
echo "Sky TV £500.00";
echo "Samsung Monitor £239.99";
?>
Also, upon executing the 'add' case within the switch statement, how do I also display the products?
The products should also get displayed if the user manually enters the .php file, via entering the file path into their browsers address bar. How do I do this?
<?php
function writeShoppingCart()
{
echo "Shopping Cart: ".'<a href="test.php">'. "1 Items".'</a>';
}
writeShoppingCart();
$id = $_GET['id'];
$action = $_GET['action'];
switch ($action)
{
case 'add':
break;
}
echo "PRODUCTS:";
echo "Sky TV £500.00";
echo "Samsung Monitor £239.99";
?>