21,887
社区成员
发帖
与我相关
我的任务
分享
<?php
include('connet.php');//连接数据库
session_start();
$UID = $_SESSION['uid'];
$q = "select * from buylist where UID = '$UID'";//设置查询指令
$result = mysqli_query($con, $q);//执行查询
session_destroy();
?>
<html >
<head>
<title>我的订单</title>
<link href="../css/home.css" rel="stylesheet" type="text/css">
<style>
li:nth-child(6) {
background-color: #11278a;
color: white;
font-weight: bold;
}</style>
</head>
<body>
<div>
<ul class="u1">
<li><a href="../home.html">首页</a></li>
<li><a href="../cx.html">车票查询</a></li>
<li><a href="../buy.html">车票购买</a></li>
<li><a href="../tp.html">退票</a></li>
<li><a href="../gx.html">改签</a></li>
<li><a href="wdd.php">我的订单</a></li>
</ul>
<a class="a1" href="../login.html">注销</a>
</div>
<table width="600" border="1" cellpadding="1" cellspacing="1" >
<br><br><br>
<h2 align="center">我的订单信息</h2>
<br><br>
<tr>
<th>时间</th>
<th>车次</th>
<tr>
<?php
while($row=mysqli_fetch_assoc($result))//将result结果集中查询结果取出一条
{
echo "<tr>";
echo "<td>".$row['time']."</td>";
echo "<td>".$row['chc']."</td>";
}
?>
</table>
</body>