All pastes #467388 Raw Edit

Unnamed

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