The system prompts "Undefinedvariable: php_self" for the Undefinedvariable variable in php paging. the page displays the list normally. when you click "next page", the page number changes, however, the page content is displayed on the first page. The system prompts rows 72nd and 79 Undefined variables: php_self. how can I modify them?
Project List
Subject No. |
Topic Name |
Instructor |
Title |
Number of persons available |
Selection |
Status |
Details |
";} Else {echo"
";} If ($ row ['Surplus '] = 0) $ ss =" not available "; else $ ss =" optional "; echo"
". $ Row ['id']." |
". $ Row ['subobject']." |
". $ Row ['teacher']." |
". $ Row ['zhicheng']." |
". $ Row ['Number']." |
". $ Row ['xuehao']." |
". $ Ss ." |
View |
"; $ N ++ ;}?>
There are currently a total of ". $ count." records ". $ Pages." page"; If ($ offset) {$ preoffset = $ offset-$ list_num; print"Previous Page";} Else {echo"Previous Page";}$ Newoffset = $ offset + $ list_num; if ($ pages! = 0) & ($ newoffset/$ list_num )! = $ Pages) {print ("Next page");} Else {echo"Next page";}$ Pageno = ($ offset/$ list_num) + 1; echo"ThePage ";?>
Reply to discussion (solution)
$ _ SERVER [PHP_SELF]
You can do this without writing.
$ _ SERVER [PHP_SELF]
Can I leave $ php_self in those two rows empty? Delete? After I delete the page, click the next page and the page will be "unable to find the page ......
Wait until today.
You should at least post the modified code!
You should at least post the modified code! The main problem is that I won't modify it ~~
Since you won't change it, why can't you find this webpage"
Since you won't change it, why can't you find this webpage"
Okay, I lost to you. I just put $ php_self in lines 71 and 79? Deleted and then run.
Project List
Subject No. |
Topic Name |
Instructor |
Title |
Number of persons available |
Selection |
Status |
Details |
";} Else {echo"
";} If ($ row ['Surplus '] = 0) $ ss =" not available "; else $ ss =" optional "; echo"
". $ Row ['id']." |
". $ Row ['subobject']." |
". $ Row ['teacher']." |
". $ Row ['zhicheng']." |
". $ Row ['Number']." |
". $ Row ['xuehao']." |
". $ Ss ." |
View |
"; $ N ++ ;}?>
There are currently a total of ". $ count." records ". $ Pages." page"; If ($ offset) {$ preoffset = $ offset-$ list_num; print"Previous Page";} Else {echo"Previous Page";}$ Newoffset = $ offset + $ list_num; if ($ pages! = 0) & ($ newoffset/$ list_num )! = $ Pages) {print ("Next page");} Else {echo"Next page";}$ Pageno = ($ offset/$ list_num) + 1; echo"ThePage ";?>
Since you won't change it, why can't "cannot find this webpage" become a line? I re-stick
Project List
Subject No. |
Topic Name |
Instructor |
Title |
Number of persons available |
Selection |
Status |
Details |
";} Else {echo"
";} If ($ row ['Surplus '] = 0) $ ss =" not available "; else $ ss =" optional "; echo"
". $ Row ['id']." |
". $ Row ['subobject']." |
". $ Row ['teacher']." |
". $ Row ['zhicheng']." |
". $ Row ['Number']." |
". $ Row ['xuehao']." |
". $ Ss ." |
View |
"; $ N ++ ;}?>
There are currently a total of ". $ count." records Total ". $ pages." pages"; If ($ offset) {$ preoffset = $ offset-$ list_num; print"Previous Page";} Else {echo"Previous Page";}$ Newoffset = $ offset + $ list_num; if ($ pages! = 0) & ($ newoffset/$ list_num )! = $ Pages) {print ("Next page");} Else {echo"Next page";}$ Pageno = ($ offset/$ list_num) + 1; echo"ThePage ";?>
You should at least post the modified code! By the way, I have defined $ list_num in advance.
You really can.
Print ("Next page");
$ Php_self.
But you
Print"Previous Page";}
? No.
Then I will change it to print"Previous Page";} And print ("Next page");
Added? But the next page is the content of the first page ~~~~
I don't know who taught you how to use error_reporting (E_ALL ^ E_NOTICE); avoid conflict
This is irresponsible!
Where is your $ offset assigned?
Since you do not have $ offset =$ _ GET ['offset'];
How can the target offset be passed in?
Since it cannot be passed in, how can we achieve paging?
I don't know who taught you how to use error_reporting (E_ALL ^ E_NOTICE); avoid conflict
This is irresponsible!
Where is your $ offset assigned?
Since you do not have $ offset =$ _ GET ['offset'];
How can the target offset be passed in?
Since it cannot be passed in, how can we achieve paging? The moderator is furious. I did not assign a value. Where should I assign a value? When I added that sentence, the system prompts that row 63rd has Undefined index: offset.
There are currently a total of ". $ count." records Total ". $ pages." pages"; If ($ offset) {$ preoffset = $ offset-$ list_num; print"Previous Page";} Else {echo"Previous Page";}$ Newoffset = $ offset + $ list_num; if ($ pages! = 0) & ($ newoffset/$ list_num )! = $ Pages) {print ("Next page");} Else {echo"Next page";}$ Pageno = ($ offset/$ list_num) + 1; echo"ThePage ";?>
I don't know who taught you how to use error_reporting (E_ALL ^ E_NOTICE); avoid conflict
This is irresponsible!
Where is your $ offset assigned?
Since you do not have $ offset =$ _ GET ['offset'];
How can the target offset be passed in?
Since it cannot be passed in, how can we achieve paging? 63rd rows, that is, 3rd rows
Now that you have extract ($ _ REQUEST );
$ Offset = $ _ GET ['offset']; is not required. Besides, if a post form is submitted, no $ _ GET ['offset']
You are downgrading php5 to try a project written in the normal working environment of php4, so there will certainly be some problems.
But you do not actually have the ability to modify the code. this cannot solve the problem of undefined variables.
In your previous posts, I have clearly told you: add extract ($ _ REQUEST) at the beginning of the program.
The purpose is to use the php4 project without the magic variable.
As for the $ php_self issue in this round, it is obvious that you made it yourself!
$ PHP_SELF instead of $ php_self (note: php variable names are case sensitive)
Now that you have extract ($ _ REQUEST );
$ Offset = $ _ GET ['offset']; is not required. Besides, if a post form is submitted, no $ _ GET ['offset']
You are downgrading php5 to try a project written in the normal working environment of php4, so there will certainly be some problems.
But you do not actually have the ability to modify the code. this cannot solve the problem of undefined variables.
In your previous posts, I have clearly told you: add extract ($ _ REQUEST) at the beginning of the program.
The purpose is to use the php4 project without the magic variable.
As for the $ php_self issue in this round, it is obvious that you made it yourself!
If it was the original version, it would be $ PHP_SELF instead of $ php_self (note: php variable names are case-sensitive) moderator. I really admire you! You not only read the code, but also people, but also bother to write such a large section to teach me. Me, me, I'm so touched !!!
Now that you have extract ($ _ REQUEST );
$ Offset = $ _ GET ['offset']; is not required. Besides, if a post form is submitted, no $ _ GET ['offset']
You are downgrading php5 to try a project written in the normal working environment of php4, so there will certainly be some problems.
But you do not actually have the ability to modify the code. this cannot solve the problem of undefined variables.
In your previous posts, I have clearly told you: add extract ($ _ REQUEST) at the beginning of the program.
The purpose is to use the php4 project without the magic variable.
As for the $ php_self issue in this round, it is obvious that you made it yourself!
If it is the original version, it is $ PHP_SELF instead of $ php_self (note: php variable names are case-sensitive) moderator. due to my level and grade problems, I repeatedly asked some mentally retarded questions in the forum every day. this is my graduation project. I was forced to be unable to solve it, and my colleagues around me didn't know how to use PHP, before the reply on July 15, June 2, the girl may be bothering you many times. sorry!
Now that you have extract ($ _ REQUEST );
$ Offset = $ _ GET ['offset']; is not required. Besides, if a post form is submitted, no $ _ GET ['offset']
You are downgrading php5 to try a project written in the normal working environment of php4, so there will certainly be some problems.
But you do not actually have the ability to modify the code. this cannot solve the problem of undefined variables.
In your previous posts, I have clearly told you: add extract ($ _ REQUEST) at the beginning of the program.
The purpose is to use the php4 project without the magic variable.
As for the $ php_self issue in this round, it is obvious that you made it yourself!
If it is the original one, it is $ PHP_SELF instead of $ php_self (note: php variable names are case-sensitive). I can't help you, but I changed it to lowercase, I have changed it now. But the system still prompts undefined variables, and I feel ashamed of myself.