Jump to the next page where a href=page.php, but where is page.php written in this code? I don’t quite understand, I hope you can explain it to me. My table name is users, not user.
page.php is a PHP file. If you don’t have this file, it will definitely report 404. Can you just create a file with the same name? The following page is a parameter or variable, and $page is the value of page. page.php is another file. You definitely can’t see the code in this file.
replyCreate a separate page.php. If I click on the next page, it will jump directly to the empty page of page.php. . . What do I need to write in page.php?
replyCreate a separate page.php. If I click on the next page, it will jump directly to the empty page of page.php. . . What do I need to write in page.php?
replyYou can write whatever you want to display when jumping to the next page. If you don't want to jump to the page.php page but display it on this page, just remove page.php and just use the ?page= parameter. Write a variable $next = $_GET['page']+1 above, and then the next page is?page=$next. In this way, when you click the next page, the value of page is +1. Then the limit of the database is the current page number (also It is the value of page) -1 Then * how much data do you want to display? For example, put the result of this operation into a variable a $a = ($_GET['page'] - 1)*10 Mysql writes select * from table name like this limit $a,10. Just put the fetched results on the page.
page.php is a PHP file. If you don’t have this file, it will definitely report 404. Can you just create a file with the same name? The following page is a parameter or variable, and $page is the value of page. page.php is another file. You definitely can’t see the code in this file.
The file name of this code should be called page.php