Ask a question about pagination

WBOY
Release: 2016-08-20 09:04:09
Original
848 people have browsed it

This paging is based on the query condition of $name. I would like to ask if the link to the page number of this paging is hard-coded during the first query? For example, when clicking on the second page, the query condition $name was not submitted. If the following if judgment is used, wouldn't $name be empty? There is no way to click on the second page. Is it like what I said at the beginning that the URLs of all page numbers have been generated during the first query, so there is no need to query based on the query conditions?

$name = isset($_REQUEST['name'])? $_REQUEST['name'] : ''; $page = isset($_REQUEST['page'])? $_REQUEST['page'] : 1;
Copy after login
Copy after login

Reply content:

This paging is based on the query condition of $name. I would like to ask if the link to the page number of this paging is hard-coded during the first query? For example, when clicking on the second page, the query condition $name was not submitted. If the following if judgment is used, wouldn't $name be empty? There is no way to click on the second page. Is it like I said at the beginning that the URLs of all page numbers have been generated during the first query, so there is no need to query based on the query conditions?

$name = isset($_REQUEST['name'])? $_REQUEST['name'] : ''; $page = isset($_REQUEST['page'])? $_REQUEST['page'] : 1;
Copy after login
Copy after login

Yes, it is generated on the first query

You can use paging controls.

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!