我有以下代码:

<!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=utf-8" />
<link rel="stylesheet" type="text/css" media="screen" href="Azulmedia.css" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
    background-color: #FFF;
}
-->
</style>
</head>

<body>
<div class="box" style='display:inline-block;'><h1><center>Pending Reservations to Approve</center></h1>
<?php

require("aacfs.php");
$result=mysql_query("select * from reservation where signoff='' and status!='Cancelled' order by reservno") or die(mysql_error());
echo "<center><div class='box'><table class='hovertable'>
    <th>Reservation No</th> 
    <th>Booking Date</th> 
    <th>Client Name</th>
    <th>Flight Date</th>
    <th>Aircraft</th>
    <th>Itinerary</th>
    <th>ETD</th>
    <th>ETA</th>
    <th>Confirmation Cut Off</th>
    <th>Status</th>
    <th>Reserved By</th>
    </tr>";
    if(mysql_num_rows($result)>0)
    {
        while($row=mysql_fetch_array($result))
        {
            $rvno=$row['reservno'];
            $rn="2012-".$rvno;
            echo"<tr><td>".$rn."</td><td>".$row['bdate']."</td><td>".$row['cliename']."</td><td>".$row['fdate']."</td><td>".$row['acode']."</td><td>".$row['itinerary']."</td><td>".$row['etd']."</td><td>".$row['eta']."</td><td>".$row['cutoff']."</td><td>".$row['status']."</td><td>".$row['adminid']."</td></tr>";

        }
    }
    else
    { ?>
        <tr><td colspan="14" style="text-align:center; color:#FF0000; font-size:16px;">*No Data Available*</td></tr>
        <?php
    }
    echo "</div>";
        ?>
</div>
</br>
<div class="box" style='display:inline-block;'><h1><center>PTR to Edit</center></h1>
<?php

//require("aacfs.php");
$result1=mysql_query("select * from reservation where (etd < now() and status = 'Confirmed' and signoff!='') or (allowed='yes') order by reservno") or die(mysql_error());
echo "<center><div class='box'><table class='hovertable'>
    <th>Reservation No</th> 
    <th>Booking Date</th> 
    <th>Client Name</th>
    <th>Flight Date</th>
    <th>Aircraft</th>
    <th>Itinerary</th>
    <th>ETD</th>
    <th>ETA</th>
    <th>Confirmation Cut Off</th>
    <th>Status</th>
    <th>Reserved By</th>
    </tr>";
    if(mysql_num_rows($result1)>0)
    {
        while($row1=mysql_fetch_array($result1))
        {
            $rvno=$row1['reservno'];
            $rn="2012-".$rvno;
            echo"<tr><td>".$rn."</td><td>".$row1['bdate']."</td><td>".$row1['cliename']."</td><td>".$row1['fdate']."</td><td>".$row1['acode']."</td><td>".$row1['itinerary']."</td><td>".$row1['etd']."</td><td>".$row1['eta']."</td><td>".$row1['cutoff']."</td><td>".$row1['status']."</td><td>".$row1['adminid']."</td></tr>";

        }
    }
    else
    { ?>
        <tr><td colspan="14" style="text-align:center; color:#FF0000; font-size:16px;">*No Data Available*</td></tr>
        <?php
    }
    echo "</div>";
        ?>
</div>

</body>
</html>

应该先显示Pending Reservations to Approve然后显示表格,然后显示PTR to EditPTR to Edit然后显示表格。 但它显示如下:

在此处输入图片说明

如何分隔两个表? Pending Reservations to Approve标题和表格首先Pending Reservations to Approve然后PTR to Edit下面的标题和表格。

===============>>#1 票数:1 已采纳

您不会关闭很多标签。 "<center><div class='box'><table class='hovertable'> -您不会关闭<table>且似乎关闭<center> "<center><div class='box'><table class='hovertable'> echo "</div>";实际上应该是echo "</table></div></center>";

  ask by xjshiya translate from so

未解决问题?本站智能推荐: