All pastes #467378 Raw Edit

Anonymous

public php v1 · immutable
·published 2007-05-02 14:13 UTC
rendered paste body
<html><head><?phpsession_start();?><title>addtocart</title></head><body><?phpif (isset ($_POST['quantity']) && !empty($_POST['quantity'])){        $flight = $_POST['flight_picked'];		$quantity_picked = $_POST['quantity'];				$_SESSION['shoppingcart'][] = array(                                	"route" =>$flight,									"quantity" =>$quantity_picked);						echo "You added". $_SESSION['shoppingcart']['quantity']. 			"of route". $_SESSION['shoppingcart']['route'];}else		{			print 	"No Flights to add<br>";			print	"at the moment (You didn't select a quantity<br>";		}		echo "No of different flights currently stored in session =			".count($_SESSION['shoppingcart']);?>	<a href="unreg.php">Unregister Session</a>		<a href="view.php" target=Area4>View Cart</a></body></html>