Example #1
0
    die;
}
?>
</div>
<div id="content">
<div id="navigation">
<h3><u>Navigation</u></h3>
<?php 
include 'navigation.php';
?>
</div>
<div id="main">
<h4><a href="index.php">Home</a> -> My Cart</h4>
<?php 
if (isset($_SESSION['errmsg'])) {
    echo $_SESSION['errmsg'] . "<br>";
    unset($_SESSION['errmsg']);
}
if (isset($_SESSION['cart']) && isset($_SESSION['numcart']) && $_SESSION['numcart'] > 0) {
    showCartTable($_SESSION['cart']);
    echo "<p style='text-align: center;'>\r\n\t\t<a class=\"selected\" href=\"checkout.php\">Checkout</a></p>";
} else {
    echo "<p><h2>Your cart is currently empty!</h2></p>";
}
?>
</div>
</div>
<div id="footer">Copyright &copy; 2015 Eagles Team.</div>
</div>
</body>
</html>
Example #2
0
</div>
<div id="main">
<h4><a href="index.php">Home</a> -> Order Receipt</h4>
<?php 
$orderid = insertOrder($_POST, $_SESSION['cart'], $_SESSION['username']);
if (!$orderid) {
    // Something went wrong
    echo "<h2 style='color:red'>Order submit failed!</h2><br>";
    die;
}
if (isset($_SESSION['errmsg'])) {
    echo $_SESSION['errmsg'] . "<br>";
    unset($_SESSION['errmsg']);
}
echo "<p><h2>Thank you for shopping with us!<br>Your order ID is: " . $orderid . "</h2></p>";
showCartTable($_SESSION['cart'], TRUE);
// Display read only version of shopping cart table
?>
	
	
<table border="0" width="100%" >
<tr><td align="left">Tax</td>
<td align="right"> <?php 
echo number_format(calculateTax(calculateTotal($_SESSION['cart'])), 2);
?>
</td></tr>
<tr><td align="left">Shipping</td>
<td align="right"> <?php 
echo number_format($_POST['shipping'], 2);
?>
</td></tr>