update,
This commit is contained in:
26
_resources/it114105/itp4513/Lab06/OrderList.php
Normal file
26
_resources/it114105/itp4513/Lab06/OrderList.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Lab06 Task 3</title>
|
||||
</head>
|
||||
<?php
|
||||
session_start();
|
||||
if(isset($_POST["golQty"])){
|
||||
$_SESSION['Golf Pants'] = $_POST["golQty"];
|
||||
}
|
||||
if(isset($_POST["wovQty"])){
|
||||
$_SESSION['Woven Pants'] = $_POST["wovQty"];
|
||||
}
|
||||
|
||||
echo "<h2>Your shopping cart contains:</h2><p>";
|
||||
foreach($_SESSION as $key=>$value){
|
||||
if($value>0)
|
||||
echo "$key Qty: $value<br>";
|
||||
}
|
||||
echo "</p>";
|
||||
session_destroy();
|
||||
?>
|
||||
<body>
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user