1.COOKIE
<?php
header("content-type: text/html; charset=utf-8");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>COOKIE购物车实现</title>
<style>
img{
width: 200px;
height: 200px;
}
</style>
</head>
<body>
<form action="2.php" method="post">
<table border=1 width="200px" height="200px">
<tr><th><img src="./img/1.jpg" alt=""><input type="checkbox" value="1" name="shop[]"></th></tr>
<tr><th><img src="./img/2.jpg" alt=""><input type="checkbox" value="2" name="shop[]"></th></tr>
<tr><th><img src="./img/3.jpg" alt=""><input type="checkbox" value="3" name="shop[]"></th></tr>
<tr><th><img src="./img/4.jpg" alt=""><input type="checkbox" value="4" name="shop[]"></th></tr>
<tr><th><img src="./img/5.jpg" alt=""><input type="checkbox" value="5" name="shop[]"></th></tr>
</table>
<input type="submit" value="提交">
</form>
</body>
</html>
<?php
header("content-type: text