pagination

Ask about general coding issues or problems here.

Moderators: egami, macek, gesf

Post Reply
User avatar
minimihi
php-forum GURU
php-forum GURU
Posts: 236
Joined: Sat Apr 14, 2012 11:57 am
Location: Vilnius, Lithuania

Thu May 10, 2012 11:08 am

You never take value of current page (parameter which is passed via GET method in page URL)

Instead of that you do "something"

Code: Select all

$page = mysql_real_escape_string($_GET['query']); 
which should be

Code: Select all

$page = $_GET['page']; 
Then you would need to change

Code: Select all

$start = ($query - 1) * $limit; 
to

Code: Select all

$start = ($page- 1) * $limit; 
Since this part is counting from which row to select data from database table.
I don't see you selecting anything, so for now this part should be irrelevant.
Post Reply