Forum Moderators: coopster
I had a code with me now. But it does not carry the $keyword = $_POST['keyword'] forward to the next page.
Therefore everytime when I am suppose to reach the end of the result. It generate all the page too with the remaining items in the database.
I know I did not pass the $keyword to the NEXT page. But I had no idea how...
My paging only works if I hard code the SELECT item FROM table WHERE column LIKE '%KEYWORD%'
Instead of $keyword.
How do I carry $keyword forward to other pages?
2 ways:
1.) post
let the user request the next page by pressing a submit button and having the value of the next page and the keyword in the form:
<form method="post" action="list.php">
<input type="hidden" name="keyword" value="keyword" />
<input type="hidden" name="page" value="2" />
<input type="submit" name="act_pn" value="<" />
</form>
2.) get
http://..../list.php?keyword=keyword&page=2
do you understand what i mean?
pagination [google.com]