i have created a very simple shopping cart, ive been using php 4.2.3. and using win xp, i have a file called SessionTrolley.php, i have been unable to add any thing to the cart, can anyone help
<?php
error_reporting(1); // suppress warning messages
session_start(); // Initialise session
session_register("trolleyContents"); // Register our variables
?>
<html><head><title>PHP session example</title>
</head><body>
<h2 align="center">Shopping trolley (php session version)</h2>
<form method="post" action="SessionTrolley.php?<?php echo SID ?>">
Choose an item: </p>
<input type="radio" name="choice" value="camera" /> camera<br />
<input type="radio" name="choice" value="snorkel" /> snorkel<br />
<input type="radio" name="choice" value="octopus" /> octopus<br />
<input type="radio" name="choice" value="cuddly toy" /> cuddly toy<br /><br />
<input type="submit" name="submit" value="Add to the trolley" />
<input type="submit" name="clear" value="Empty the trolley" /><br />
</form>
<?php
if ((!$trolleyContents && !$choice) || $clear) {
$trolleyContents = "";
echo "<p>Trolley currently empty</p>";
} else {
if ( $choice ) $trolleyContents = $trolleyContents . "<li>$choice</li>";
echo "<p>Trolley contains:</p>";
echo "<ul>$trolleyContents</ul>";
}
?>
</body></html>