Hi all,
Following is my query. I am taking the category_id as an input from the user. Depending upon the ID the query is generated. Multiple pages are shown, depending upon of records fetched. Presently I am showing 10 records per page.
Following is the partial code referring the above query.
$item_categ_id_v = $HTTP_POST_VARS['categ_id_v'];
This is the category ID received from first form, to retrieve the records.
When the number of records are more than 10, multiple pages are required.
To show the second page onward, ( or going backward) "Next" and "Prev" options are enabled.
Following line I am using to get the next set of records ( i.e. record numbers 11 - 20 )
print " <a href=\"$PHP_SELF?limit=$limit&&offset=$newoffset&&curr_page=$i&&item_categ_id_v=$item_categ_id_v\">$i</a>   ";
Here : offset is used to store number of records fetched from query, limit is used to store number of records to be displayed per page, curr_page is used to store current page number displayed, item_categ_id is the ID based on which query is formed.
But above "print" statement does not take category ID value. THe ID value is lost and all the records are fetched from the table. ( in other words, the where clause is not formed for second page onwards. )
Can anybody help me out?
Thanks in advance.