This commit is contained in:
louiscklaw
2025-02-01 01:58:47 +08:00
parent b3da7aaef5
commit 04dbefcbaf
1259 changed files with 280657 additions and 0 deletions

View 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>