<?Php
/*
* @author Istvan Franko
* @copyright 2014
*/

session_start();

if (!isset($_SESSION['cart'])) 
{
  $_SESSION['cart']=array(); 
}

if (!isset($_SESSION['loggedin'])) 
{
  $_SESSION['loggedin'] = '0'; 
}
?>

<html>

<head>
<title>Natty Notebooks Inc.</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>

<body>

<div id="container">

	<div id="header">
	<! header picture in css >
	</div>
	
	<div id="navigation">
		<?php include 'navigation-bar.php'; ?>
	</div>
	
<div id="aside">
	<!--Link for navigation-->
	<a href="product-list.php"><p style="text-align:center">Back to list</a></p>	

	<fieldset style="width:85%"><legend>HELP</legend>
	<p>You have emptied the whole cart.</p> 
	</fieldset><br>
</div>

<div id="content">
<br>
<fieldset style="width:95%"><legend>EMPTYING THE CART</legend>
<br>
<p><img width="120" src="images/shopping-cart.png" alt="Shopping Cart" style="float:left">


<?Php

//read session array and remove items
while (list ($key, $val) = each ($_SESSION['cart'])) 
{
echo "Item number " . $val. " has been removed from your cart.<br>";
unset($_SESSION['cart'][$key]);

}

echo "<br><br><br><br><hr/>";
echo "You have " . sizeof($_SESSION['cart']) . " item in you cart.";

?>


</fieldset>

</div>

<div id="footer">
<p align="center">Copyright &#169; Istvan Franko, 2014</p>
</div>


</div>

</body>
</html>