car1.php 显示生活类物品
//<!--<?php
//include("conn.php");
//$sql="select * form ";
//mysql_query($sql);
//
//
//?>-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<form action="car.php" method="post">
<input type="checkbox" name="cart[]" value="毛巾"/>毛巾<br />
<input type="checkbox" name="cart[]" value="牙膏"/>牙膏<br />
<input type="checkbox" name="cart[]" value="牙刷"/>牙刷<br />
<input type="checkbox" name="cart[]" value="盆"/>盆<br />
<input type="submit" name="tijiao" value="放入购物车" />
</form>
</body>
</html>
car2.php 显示文化类物品
<?php
//检验$_POST[]相关信息
print_r($_POST['cart']);
//include("conn.php");
//$sql="select * form ";
//mysql_query($sql);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>文化用品</title>
</head>
<body>
<form action="car.php" method="post">
<input type="checkbox" name="cart[]" value="笔"/>笔<br />
<input type="checkbox" name="cart[]" value="墨"/>墨<br />
<input type="checkbox" name="cart[]" value="纸"/>纸<br />
<input type="checkbox" name="cart[]" value="砚"/>砚<br />
<input type="submit" name="tijiao" value="放入购物车" />
</form>
</body>
</html>