div id = "retrieve"
是我在数据库中检索数据的div
。但是下面的页脚出现在div id ="retrieve"
。
我哪里错了?
检索正常发生但它也在里面显示页脚。
<!DOCTYPE html>
<html>
<head>
<title>Shreegurudev Datta | Home</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/css?family=Dosis" rel="stylesheet">
<link href="http://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.min.css" media="screen,projection"/>
<link href="https://fonts.googleapis.com/css?family=Noto+Sans&subset=devanagari,latin-ext" rel="stylesheet">
<!--fonts-->
<link href="https://fonts.googleapis.com/css?family=Baloo+Chettan" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Advent+Pro" rel="stylesheet">
<!--Let browser know website is optimized for mobile-->
<style>
body{
background:url("bg.jpg");
background-size: cover;
font-family: 'Dosis', sans-serif;
}
slider{
width:100%;
height:auto;
}
/* Add animation to "page content" */
.animate-bottom {
position: relative;
-webkit-animation-name: animatebottom;
-webkit-animation-duration: 1s;
animation-name: animatebottom;
animation-duration: 1s
}
@-webkit-keyframes animatebottom {
from {
bottom:-100px;
opacity:0
}
to {
bottom:0px;
opacity:1
}
}
@keyframes animatebottom {
from{
bottom:-100px;
opacity:0
}
to{
bottom:0;
opacity:1
}
}
</style>
</head>
<body>
<!-- Corousel-->
<div class = "navbar">
<nav class="orange">
<div class="nav-wrapper">
<a href="index.html" class="brand-logo left"><image src = "dattaguru.jpg" style = "padding-top : 10px; padding-left:10px;"/></a>
<a href="#" data-activates="mobile-demo" class="button-collapse"><i class="material-icons" style = "color:indigo;">menu</i></a>
<ul class="right hide-on-med-and-down" >
<li class = "active"><a href="home.html" style = "color:yellow accent-4 ;"><i class="material-icons left">home</i>Home</a></li>
<li><a href="history.html" style = "color:yellow accent-4 ;"><i class="material-icons left">stars</i>History</a></li>
<li><a href="festivals.html" style = "color:yellow accent-4 ;"><i class="material-icons left">equalizer</i>Festivals</a></li>
<li><a href="seva.html" style = "color:yellow accent-4 ;"><i class="material-icons left">widgets</i>Sevas</a></li>
<li><a href="gallery.html" style = "color:yellow accent-4 ;"><i class="material-icons left">wallpaper</i>Gallery</a></li>
<li><a href="project.html" style = "color:yellow accent-4 ;"><i class="material-icons left">today</i>Projects</a></li>
<li><a href="contact.html" style = "color:yellow accent-4 ;"><i class="material-icons left">contacts</i>Contact</a></li>
<li><a href="donate.html" style = "color:yellow accent-4 ;"><i class="material-icons left">payment</i>Donations</a></li>
</ul>
<ul class="side-nav" id="mobile-demo" style = "color:white;">
<img src="logo.png">
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="gallery.html" style = "color:indigo ;">Gallery</a></li>
<li><a href="contact.html" style = "color:indigo ;">Contact Us</a></li>
</ul>
</div>
</nav>
</div>
<div style="" id="main" class="animate-bottom">
<div class = "header">
<h3 style="text-align:center; color: #b91100; font-weight: bolder">|| श्रीगुरूदेव दत्त ||</h3>
<marquee scrollamount="7" behavior="infinite" hspace="70"><h5 style="text-align:center; color: #b91100; font-weight: bold">|| दिगंबरा दिगंबरा श्रीपाद वल्लभ दिगंबरा ||</h5></marquee>
</div>
<div class = "cover">
<img src="banner.jpg" style="padding-left:250px; width:1100px; height:420px;">
</div>
<div class="row">
<h2 style="text-align:justify; padding-left:60px; color:green;">Shree Gurudev Datta</h2>
<hr width="90%">
<h5 style="text-align:justify; padding-left:60px; color:green;">|| Digambara Digambara Shreepad Vallabh Digambara ||</h5>
<div class="col s9" style="text-align:justify; padding-left:50px;">
<p style="font-size:20px; color:maroon; padding-left:5px; padding-right:5px; border-radius:10px;"> Shree Saunsthan Dattawadi, Sankhali, The Holy Abode of Shree Dattaguru - the trinity of Lord Brahma, Lord Vishnu and Lord Mahesh - evokes deep devotion in the heart of every devotee residing not only in Goa but other parts of the world as well.
Situated in beautiful sylvan surroundings, the heavenly and serene ambience pervading within the precincts of the temple catapults visiting devotees to world full of divine bliss.
The precincs normally referred to as 'Dattawadi', is the pilgrimage centre visited by thousands of devotees and legend has it that their prayers are answered by the Almighty. It is also famous as a centre for miraculous cure for mental troubles. This beautiful structure was established way back in the year 1925 ('shakey' 1804 according to the Hindu almanac).
The Dattatray temple completed 125th anniversary of it's inception in April 2007 with great pomp and splendour. The centenary celebrations in 1982, too, had witnessed similar grandeur.</p></div>
<div id = "retrieve" class="col s3" style="text-align:justify; background-color:orange; width:250px; height:300px; margin-top:23px; border-radius:10px;">
<?php
$host="localhost";
$user="root";
$password="";
$db="db_name";
$con=mysqli_connect($host,$user,$password,$db);
$sql_query="select * from Notifications";
$result=mysqli_query($con,$sql_query);
//echo '<h1>News Flash</h1>';
echo "<center><table cellpadding='5' border='5'>
<tr>
<th>Date</th>
<th>News</th>
</tr></center>
";
while($row=mysqli_fetch_array($result,MYSQLI_ASSOC))
{
echo '
<tr>
<td>'.$row['date'].'</td>
<td>'.$row['news'].'</td>
</tr>
';
}
?>
</div>
</div>
<!--this footer comes in the div id ="retrieve"-->
<div class="footer-copyright" style="padding-left:100px;">
<p style="text-align:center; background-color:#004d40; width:auto; height:50px; padding-top:15px;color:#ffffff;">In memory of late Sau Sunanda & late Avadhut Dattatraya Gaitonde</p>
</div>
<!--close loader-->
</div>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
<script type="text/javascript" src="js/materialize.min.js"></script>
<script src="js/init.js"></script>
<script>$(document).ready(function(){
$('.slider').slider({full_width: true});
});</script>
</body>
</html>
答案 0 :(得分:0)
问题似乎是第126行的'table'标签,因为我在代码中找不到它的对应部分:
[...]
echo "<center><table cellpadding='5' border='5'>
<tr>
<th>Date</th>
<th>News</th>
</tr></center> //<-- there is no </table> before </center>
";
[...]