I face a problem whenever the user tries to browse to second page via $_GET if they have submitted $_POST data.
if(!isset($_POST['submit'])) {
//search input box
}
else {
//search details output
//pagination code
}
Whenever user press page 2, it shows //search input box back.
I want search to show page 2 and not //search input box back.
As @Alan says… page 2 isn’t receiving
POSTdata, sosubmitis not set and it thinks the starting form should be shown again. A secondGETvariable (egpage) to track the results-page, will allow all three pages (start, page1+submit, page2)Don’t forget to store your
POSTdata somewhere temporarily so that you have data to display on the pages.