All pastes #467350 Raw Edit

Someone

public php v1 · immutable
·published 2007-05-02 13:57 UTC
rendered paste body
<html><head><title>addtocart</title></head><?phpsession_start();?><body><?phpif (isset ($_POST['quantity']) && !empty($_POST['quantity'])){		if (! isset($_SESSION['shoppingcart')		{			echo "creating new array";			$flight = $_POST['flight_picked'];			$quantity_picked = $_POST['quantity'];			$_SESSION['shoppingcart'][] = array(                                        "route" =>$flight,					"quantity" =>$quantity_picked					);		}		else 		{				echo "Adding new flight to the array";			$_SESSION['shoppingcart'][] = array(					"route" =>$flight,					"quantity" =>$quantity_picked					);							}			echo "No of different flights currently stored in session =			".count($_SESSION['shoppingcart']);				?></body></html>