Click here to Skip to main content
15,888,055 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm doing a dynamic site in PHP. I have my 'News & Event' section as a slider. The content can be added from the backend. The problem is that I can see only 1 event in my website. I cannot view more than that, no matter how many events i add from the backend. Can somebody help me?

What I have tried:

<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);
$result2="";

$nid="";
while($record=mysql_fetch_array($resource1))
{
	
  
           $nid=$record['nid'];
		   $nimg="uploadsn/".$record['nimg'];
		   $nname=$record['nname'];
		    $result2.="<ul id='flexiselDemo1'>
		  <li>
		  <div class='w3_agile_portfolio_grid'>
                    <img src='$nimg' alt=' ' class='img-responsive' >
					
                               <div class='w3layouts_news_grid_pos'>
						<a href='#'><div class='wthree_text'><h3>$nname</h3></div></a>
						</div>
								 
							</div>	
                          </li>      
                      </ul>";
}

		   ?>
		   
                          <?php  echo $result2;?>
         
	</div>
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900