include("/home/config/careerstages/gifnoc.php");
include("$serveraddr/include/header.php");
include("$serveraddr/include/mainnav.php");
include("$serveraddr/include/storepic.php");
//connect to the mysql server
include("/home/config/careerstages/func.php");
include("/home/config/careerstages/dbconn.php");
$dbcnx=dbconn( $host, $user, $pass, $dbname);
breadcrumb(3, "Cart");
?>
Shopping Cart
if (!isset($_SESSION['cart']) || (sizeof($_SESSION['cart'])==0)) {
echo("Your shopping cart is empty.
Return to Career Store");
} else {
?>
Here are the contents of your shopping cart.
echo("
Item |
Description |
Price |
Action |
");
$subtotal=0;
foreach($_SESSION["cart"] as $pid => $qty) {
//echo "Item $pid is in your cart $qty time(s).
\n";
$sql="SELECT * FROM products,categories where products.catid=categories.catid and pid='$pid'";
$res=mysql_query($sql);
$row=mysql_fetch_array($res);
$category=$row["category"];
$name=$row["name"];
$shortdesc=$row["shortdesc"];
$price=$row["price"];
printf("
".$name." |
".nl2br(stripslashes($shortdesc))." |
Eur%.2f |
Remove |
", $price);
$subtotal+=$price;
}
printf("
Total excl. VAT: |
Eur%.2f |
", $subtotal);
printf("
Total incl. VAT: |
Eur%.2f |
", pricewithvat($subtotal));
echo("
[ Continue Shopping
| Proceed to Checkout ]");
} // end if
?>
include("$serveraddr/include/defaultright.php");
include("$serveraddr/include/footer.php");
?>