Php代码干扰html页脚 [英] Php code interfering in html footer
问题描述
这是发生了什么,当我用html代码手动编写表,页脚停留在页面的底部,但应该是,但是当我这样做与php的页脚出现在页面的中间。下面是我用来打印表的PHP代码:
This is what's happening when I write the table manually with html code the footer stays in the buttom of the page where it should be, but when I do that with php the footer shows up in the middle of the page. Below is the php code I have used to print the table:
<?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
?>
这里是一张照片来说明我的问题:
Here is a photo to illustrate my problem:
tranpsparent灰色块是页脚,它在中间页面它不停留在底部。如果这样做只有html没有任何PHP代码,页脚停留在结束,它不干扰桌子。
有人能给我一个想法我做错了什么?
Thx
the tranpsparent grey block is the footer and it's on the middle of the page it doesnt stay in the bottom. If do that only with html without any php code the footer stays in the end and it doesnt interfer with teh table. Can some give me an idea what am I doing wrong? Thx
推荐答案
here
is
the
a
n
s
w
e
r
"It appears that you haven't
closed the table </table>"
这篇关于Php代码干扰html页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!