1.php大作业 完成了个人订单查询
<?php
$page=1;
$name=null;
if(!empty($_GET)) {
if(isset($_GET["message"]))
{
$message = $_GET["message"];
echo "<script>alert('$message');</script>";
}
if(isset($_GET["page"]))
{
$page=$_GET["page"];
}
else
{
$page=1;
}
if (!session_id()) session_start();
if(isset($_SESSION["type"]))
{
if($_SESSION["type"]==0)
{
header("location:goodlist.php?message=NotRegister!&page=$page");
return;
}
else
{
$name=$_SESSION["name"];
}
}
else
{
header("location:goodlist.php?message=NotRegister!&page=$page");
return;
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>个人订单查看</title>
</head>
<body style="text-align:center;">
<h1>个人订单查看</h1>
<br/>
<br/>
<table align="center" border="1" cellspacing="0" style="50%;">
<tr>
<th style="background:yellow;">订单号</th>
<th style="background:yellow;">收货人</th>
<th style="background:yellow;">收货人地址</th>
<th style="background:yellow;">商品id</th>
<th style="background:yellow;">商品数量</th>
<th style="background:yellow;">订单金额</th>
<th style="background:yellow;">手机号</th>
<th style="background:yellow;">商品名称</th>
<th