当我用html代码手动编写表格时,这就是正在发生的事情,页脚停留在页面的底部应该是,但是当我使用php执行此操作时,页脚会显示在页面中间页。下面是我用来打印表格的PHP代码:
<?php
if (isset($_POST["tipi"],$_POST["godina"],$_POST["kati"]))
{
// Create connection
$con=@mysqli_connect("localhost","root","","merville");// duhet ndryshuar emri i databazes dhe pastaj emri i tabeles ne rastin tone merville
// Check connection
if (mysqli_connect_errno()) {
echo "Per momentin faqja eshte duke u punuar. ";
}
else{
//#################################
$tipi=$_POST["tipi"];
$godina=$_POST["godina"];
$kati=$_POST["kati"];
$dhoma=$_POST["dhoma"];
//#################################
//############ berja e querit
$kerkim="SELECT * FROM motorrkerkimi WHERE tipi='$tipi'
AND godina='$godina' And kati='$kati' And dhoma='$dhoma'
ORDER BY vleratotale ASC";
$query1=mysqli_query($con,$kerkim);
//############
echo "<table border='2' class='table-fill' >
<thead>
<tr>
<th>Apartamenti </th>
<th>Dhoma </th>
<th>Kati </th>
<th>Sip. Totale m2 </th>
<th>Cmimi Euro/m2 </th>
<th>Vlera totale Euro </th>
<th>Foto dhe Detaje </th>
</tr>
</thead>
";
echo "<tbody class='table-hover'>";
while($kerkim=mysqli_fetch_array($query1)){
echo "<tr>";
echo "<td>"; echo "".$kerkim[1]; echo "</td>";
echo "<td>"; echo "".$kerkim[6]; echo "</td>";
echo "<td>"; echo "".$kerkim[4]; echo "</td>";
echo "<td>"; echo "".$kerkim[12]; echo "</td>";
echo "<td>"; echo "".$kerkim[10]; echo "</td>";
echo "<td>"; echo "".$kerkim[11]; echo "</td>";
echo "<td>"; echo "<a href='$kerkim[14]' >Shiko</a>"; echo "</td>";
echo "</tr>";
}
echo "</tbody>";
mysqli_close($con);
}// fundi i else-it fillestar i cili ben ekzekutimin e kodit nqs databaza eshte pa probleme.
}else{echo "<h2>Ju lutem plotesoni te dhenat perpara se te klikoni.</h2>";}// fundi i if-it fillestar
?>
这是一张说明我问题的照片:
透明的灰色块是页脚,它位于页面的中间,它不会留在底部。如果仅使用没有任何PHP代码的html,页脚停留在最后并且它不会干扰表。 有些人可以让我知道我做错了什么吗? THX
答案 0 :(得分:5)
here
is
the
a
n
s
w
e
r
"It appears that you haven't
closed the table </table>"