pendingorders.php
来自「《PHP专业项目实例开发》源代码」· PHP 代码 · 共 46 行
PHP
46 行
<html>
<head>
<title>Pending order browser</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<?php
$connect= mysql_connect("localhost","root","")
or die("Could not connect to MySQL server in localhost !");
$selectdb=mysql_select_db("books")
or die("Could not select books database !");
$sqlquery = "SELECT * from orders";
$queryresult = mysql_query($sqlquery);
echo "<table width=700 border=1 align=center>";
echo " <tr>";
echo " <td width=200> <center><b>Orderid </b></center></td>\n";
echo " <td width=200> <center><b>Customerid</b></center></td>\n";
echo " <td width=200> <center><b>Date</b></center></td>\n";
echo " <td width=100> <center><b>Amount</b></center></td>\n";
echo " <td width=100> <center><b>Status</b></center></td>\n";
echo " </tr>\n";
while ($row=mysql_fetch_array($queryresult))
{
if ($row["status"]=="Pending"){ echo " <tr>\n";
echo " <td><center>".$row["orderid"] ."</center></td>\n";
echo " <td><center>".$row["customerid"]."</center></td>\n";
echo " <td><center>".$row["orderdate"] ."</center></td>\n";
echo " <td><center>".$row["price"] ."</center></td>\n";
echo " <td><center><A href=\"orderdetails.php?orderid=".$row["orderid"]."\">details</a></center></td>\n";
echo " </tr>\n";
}}
echo "</table>\n";
?>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?