Hi,
I am currentlly using this code to populate news from my database. I want to know how can I make the same paging the result with NEXT and PREVIOUS button?
<?php
$conn = mysql_connect('mysql.jassimrahma.com', 'jassimxxxx', 'xxxxx');
mysql_select_db("jassimrahma", $conn);
$result = mysql_query("SELECT news_id, news_title, date_format(created_date, '%d %M %Y') as 'news_date' FROM news ORDER BY created_date DESC, news_id DESC", $conn);
$affected_rows = mysql_num_rows($result);
echo "<table width='100%' cellpadding='3' cellspacing='3'>";
while ($i < $affected_rows)
{
$news_id = mysql_result($result, $i ,"news_id");
$news_title = mysql_result($result, $i ,"news_title");
$created_date = mysql_result($result, $i ,"news_date");
echo "<tr>";
echo "<td align='center' valign='top'>";
echo "<img src='http://www.jassimrahma.com/images/news_arrow.jpg' alt='Jassim.com News' />";
echo "</td>";
echo "<td align='left' valign='top'>";
echo "<a href='http://www.JassimRahma.com/$news_id' target='_blank'>$news_title</a>";
echo "</td>";
echo "</tr>";
$i++;
}
echo "<tr><td align='center' valign='top'></td><td align='left' valign='top'><a href='http://www.JassimRahma.com/news' target='_self'><img src='images/more_news.jpg' alt='Technology News - JassimRahma.com' /></a></td></tr>";
echo "</table>";
?>