networkthis Posted October 27, 2008 Share Posted October 27, 2008 Ok here it goes... I am using pagination to display the results of my mysql query into only 25 rows per page. The pagination works great. However... I have implemented a simple mysql search into it similar to <?php ("SELECT * FROM table WHERE name LIKE '%$value%' ") ?> Here is my problem...everytime that I use my pagination links at the bottom of the page without a search they work great. I can get them to display the proper amount of pages for each search at the bottom of the page. But once I click the pagination link it reverts back to querying all the results, not just what I have put in the search. I have a $_POST['value'] at the top of the page to take the input from the original search page...it works great displaying results. Until the pagination link is hit at the bottom of the page. Is there a way to keep the $_POST['value'] alive all the time page is in use...until there is another search? I am using pagination links like this http://www.mysite.com?pagenumber=1 is there maybe a way to take the $_POST['value'] and maybe have a ?seach=$value at the end of the pagenumber=1 instead. I am really at a loss at this point. I am fairly new to php and appreciate all your help. Thank you Quote Link to comment Share on other sites More sharing options...
Jeremysr Posted October 27, 2008 Share Posted October 27, 2008 I would make the search form use the GET method (<form action="get">), then when linking to the next page, have the search result in the URL like you said. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.