The pagination of search results in PHP cannot be the same as that of common data. The pagination link is invalid because the form data will not be lost when the pagination link is clicked.
There are several solutions.
The first is to use the website management software to generate static pages for search results and save them for a period of time.
The second is to use session to transmit the search information.
When the search information form is submitted and verified, the session is enabled.
Session_start ();
$ _ Session ["keywords"] = $ X;
$ _ Session ["searchscope"] = $ Y;
... // Assign a value to the search information. Keyword, search range, etc.
On the search results page, enable the session to get the search information and then submit it.
Session_start ();
$ KEYWORDS = $ _ session ["keywords"];
$ Searchscope $ _ session ["searchscope"];
....
The third is to store search information in a database.
After the search information form is submitted, the form content is stored in the database and displayed on the search page. The search page retrieves the search information from the database and starts searching.