I'm doing a dynamic site in php. I have a section 'News & Events' which is a slider . The news can be added from the backend. The problem is that when i add news/event from the backend, only 1 event is shown on the screen. This is my html code:
<div id="portfolio" class="portfolio"><h3 class="wthree_title_agile" ><span style="color:#5a0c4d">L</span>atest Updates </h3>
<?php
require_once("admin/config/connection.php");
//$psize="";
//$proicode="";
//$probarcode="";
$nname="";
//$proitems="";
$nid="";
$query1="select * from news_tb";
$resource1=mysql_query($query1,$connection);
$result1="";
$id="";
while($record=mysql_fetch_array($resource1))
{
$nid=$record['nid'];
$nimg="uploadsn/".$record['nimg'];
$nname=$record['nname'];
$result1.="<ul id='flexiselDemo1'>
<li>
<div class='w3_agile_portfolio_grid'>
<img src='$nimg' alt=' ' class='img-responsive' >
<div id='tex'>
$nname</div>
</div>
</li>
</ul>";
}
?>
<div class="carousel-inner ">
<div class="item active">
<div class="container-fluid mrgn_less">
<div class="row">
<div class="col-md-12 mrgn_less col_bg" style="padding-bottom:13px;;margin-bottom:1em">
<?php echo $result1;?>
</div>
</div>
</div>
</div>
</div>
</div>
This is my table news_tbTable news_tb
This is my website. My website Only one news/event is shown. Can somebody help me with this?
Comments
Post a Comment