时间:2021-07-01 10:21:17 帮助过:13人阅读
<?php
include("connectDB.php");
@$query=mysql_query($con,"SELECT * from xx");
@$result=mysql_fetch_array(@$query);
if($result==true){
?>
<table width="100%" height="30" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="36" align="center">暂无信息!</td>
</tr>
</table><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13%">
<a href="newxx.php">插入信息</a>
<td width="13%">
<a href="query.php">查询信息</a>
</td>
</tr></table>
<?php}else{?>
<table width="90%" height="70%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="13%">
<a href="newxx.php">插入信息</a>
</td>
<td width="13%">
<a href="query.php">查询信息</a>
</td> </tr></table>
<table width="80%" height="70%" border="1" cellpadding="0" cellspacing="0" bordercolor="#FFFFFF"
bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF"> <br> <br> <br>
<tr align="center"><td align="center">信息</td>
</tr></table><table width="90%" height="70%" border="3" cellpadding="1" cellspacing="1" bordercolor="#FFFFFF"
bordercolordark="#D2E3E6" bordercolorlight="#FFFFFF"> <tr align="center" bgcolor="#e3F4F7">
<td width="10%" bgcolor="#e3F4F7">信息id</td>
<td width="30%" bgcolor="#e3F4F7">信息内容</td>
<td width="14%" bgcolor="#e3F4F7">查看</td> <td width="10%" bgcolor="#e3F4F7">修改</td>
</tr><?php//循环显示数据库信息do{ ?> <tr>
<td style="padding:5px;" bgcolor="#e3F4F7" align=center>
<?php echo $result['xxid'];?></td>
<td style="padding:5px;" bgcolor="#e3F4F7" align=center>
<?php echo $result['xxnr'];?></td>
<td align="center" bgcolor="#e3F4F7"><a href="show.php?$xxid=<?php echo $result['xxid'];?>">查看</a></td>
<td align="center" bgcolor="#e3F4F7"><a href="updata.php?$xxid=<?php echo $result['xxid'];?>">修改</a></td>
</tr><?php}while(@$result=mysql_fetch_array($query));}?>