I am making this website in PHP, which shows some data from the DataBase.... A website that shows results of the students.
Now I am retrieving some data from the DataBase and displaying it in the table. I have 2 Buttons. Both just redirect. One is above the table, another one is below the table. Now whatever I write below the table, is shown above the table.
<div class='instructionContainer'>
Click on any of the record to redirect yourself to the image. You can also download the images as PDF or PNG.
</div>
<div class="rankerButtonContainer"><button class='rankerButton' onclick=setTimeout(function(){window.location="ranker.php?sem=<?php echo $_GET['sem']; ?>"},500);>Rankers</button></div>
<table border='0' align='center'>
<tr class='tableHeading'>
<th class="number">Sr No.
<th>Name
<th>Seat No.
<th>Marks
<th colspan='2'>Download
</tr>
<?php
$result=$conObj->query("select * from data");
$i=1;
if($_GET["sem"]==1)
echo "<div class='noData'>Data is not yet entered...</div>";
elseif($_GET["sem"]==2)
echo "<h1>Data is not yet entered...</h1>";
elseif($_GET["sem"]==3)
echo "<h1>Data is not yet entered...</h1>";
elseif($_GET["sem"]==4)
echo "<h1>Data is not yet entered...</h1>";
elseif($_GET["sem"]==5){
while($temp=mysqli_fetch_array($result)){
if($temp[16]== 531335)
continue;
?>
<tr id='<?php if($temp[18]) echo "pass"; else echo "fail"; ?>' onclick="window.location='assets/BCA5/<?php echo $temp[16]; ?>.png'">
<td class="number"><?php echo $i; ?>
<td><?php echo $temp[2]." ".$temp[3]; ?>
<td><?php echo $temp[16]; ?>
<td><?php echo $temp[17]; ?>
<td id='imgTd'><a href='assets/BCA5/<?php echo $temp[16]; ?>.pdf' download><img src='assets/images/icons/pdf.png'/></a>
<td id='imgTd'><a href='assets/BCA5/<?php echo $temp[16]; ?>.png' download><img src='assets/images/icons/camera.png'/></a>
</tr>
<?php
$i+=1;
}
}
elseif($_GET["sem"]==6)
echo "<h1>Data is not yet entered..</h1>";
?>
<div class="backButtonContainer"><button class='backButton' onclick=setTimeout(function(){window.location="home.php"},500);>Rankers</button></div>
The .backButtonContainer and it's contents are shown above the table, which I don't want it to. So can anyone tell me the solution to this and also the reason for it to happen like this. And I don't want any alternate solutions, I just want my button to be exactly below the table, similar to how .rankerButtonContainer is above the table.