Jump to content

[SOLVED] How to get next page link


forcom

Recommended Posts

My database has over 200 rows and I trying to get  my data to display 10 rows and create next page.

 

 

$row_per_page = 10;

$q = mysql_query("SELECT * FROM table");

$total_rows = mysql_num_rows($q);

if ($total_rows > $row_per_page) $pages = ceil($total_rows / $row_per_page);

$addpage = $pages + 1;

echo "Page";

for ($number = 1; $number < $addpage; $number++){

echo "$number";

  }



Link to comment
https://forums.phpfreaks.com/topic/162510-solved-how-to-get-next-page-link/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.