Imtehbegginer Posted October 3, 2007 Share Posted October 3, 2007 <?php include('includes/config.php'); $connect = mysql_connect($config['host'], $config['user'], $config['pass']); $database = mysql_select_db($config['name']); $query = mysql_query("SELECT * FROM rosecms_news"); $news = mysql_fetch_array($query); echo '<H1>'.$news['title'].'</h1>'; echo $news['date']; echo '<BR>'; echo '<BR>'; echo $news['content']; ?> That is my code above... how can I return the next set of data? If I re-do the script, it returns the exact same data. Quote Link to comment Share on other sites More sharing options...
marcus Posted October 3, 2007 Share Posted October 3, 2007 while($news = mysql_fetch_array($query)){ echo '<H1>'.$news['title'].'</h1>'; echo $news['date']; echo '<BR>'; echo '<BR>'; echo $news['content']; echo "<br><br>\n"; } in replace of: $news = mysql_fetch_array($query); echo '<H1>'.$news['title'].'</h1>'; echo $news['date']; echo '<BR>'; echo '<BR>'; echo $news['content']; Quote Link to comment Share on other sites More sharing options...
Imtehbegginer Posted October 3, 2007 Author Share Posted October 3, 2007 That was a really fast reply. Thanks! Quote Link to comment Share on other sites More sharing options...
marcus Posted October 3, 2007 Share Posted October 3, 2007 Fo sho. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.