PHP paging problem system hints undefined variable undefined variable:php_self

Source: Internet
Author: User
This page is a page that can display the list normally, and when you click Next, the number of pages changes, but the page content is the first page that appears. The system prompts for rows 72nd and 79 undefined variable undefined variable:php_self How do I change it?
  
 
  
 
 
  
 <title>List of topics</title>
 
  ";} else{echo " 
   
     "; }if ($row [' Surplus ']==0) $ss = "not selectable"; else $ss = "optional"; Echo 
    "; $n + +; }?> 
  

topic number

topic name instructor title optional status
". $row [' id ']." ". $row [' Subject ']." ". $row [' Teacher ']." ". $row [' Zhicheng ']." ". $row [' number ']." ". $row [' Xuehao ']." ". $ss." View
There are currently ". $count." Article 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 it without writing.

$_server[php_self]
Do not write can also be the two lines inside the $php_self? I deleted the next page after clicking on the "Can't find this page" ...

I waited until yesterday to wait until today.

You should at least post the modified code!

You should at least post the modified code! The main problem is I will not modify it ~ ~

Since you're not going to change, where's the "Can't find this page"

Since you're not going to change, where's the "Can't find this page"
Well, I lost to you. I just put 71, 79 lines of $php_self? deleted and then run.

  
 
  
  
 
  
 <title>List of topics</title>
 
  ";} else{echo " 
   
     "; if ($row [' Surplus ']==0) $ss = "not selectable"; else $ss = "optional"; Echo 
    "; $n + +; }?> 
  

topic number

topic name instructor title optional topics State
". $row [' id ']." ". $row [' Subject ']." ". $row [' Teacher ']." ". $row [' Zhicheng ']." ". $row [' number ']." ". $row [' Xuehao ']." ". $ss." View
There are currently ". $count." Article 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're not going to change, what's the "can't find this page"? How did it become a line? I re-stick

  
 
  
 
 
  
 <title>List of topics</title>
 
  ";} else{echo " 
   
     "; }if ($row [' Surplus ']==0) $ss = "not selectable"; else $ss = "optional"; Echo 
    "; $n + +; }?> 
  

topic number

topic name instructor title optional status
". $row [' id ']." ". $row [' Subject ']." ". $row [' Teacher ']." ". $row [' Zhicheng ']." ". $row [' number ']." ". $row [' Xuehao ']." ". $ss." View
There are currently ". $count." Article Records Total ". $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 "; ?>

You should at least post the modified code! By the way, I need to explain that my $list_num has been defined in advance.

You can do it.
Print ("next page");
Say it's $php _self can not
But you
Print "Previous page";}
Even? And no more.

Then I'm going to change it to print "previous page";} and print ("next page");
After the addition, to is no error, but the next page is the first page of content AH ~ ~ ~

I do not know who taught you to use error_reporting (e_all ^ e_notice); Avoid the contradiction
This is irresponsible!
Where does your $offset assign value?
Since you do not have $offset = $_get[' offset ';
So how can the target offset be passed in?
Since can not pass, that page how to achieve?

I do not know who taught you to use error_reporting (e_all ^ e_notice); Avoid the contradiction
This is irresponsible!
Where does your $offset assign value?
Since you do not have $offset = $_get[' offset ';
So how can the target offset be passed in?
Since can not pass, that page how to achieve? Moderator propitiate, moderator perspicacious. Indeed I have no assignment, where should I assign a value? I added that sentence, the system also prompted the 63rd line has Undefined Index:offset

 
 
                             There are currently ". $count." Record     total ". $pages." Page ";   if ($offset) {$preoffset = $offset-$list _num;print "previous";} else {  echo "prev";} $newoffset = $offset + $list _num;  if ($pages!=0) && (($newoffset/$list _num)! = $pages)) {print ("Next");} else{echo "Next";} $pageno = ($offset/$list _num) +1;echo "section      Page     ";    ? >  

I do not know who taught you to use error_reporting (e_all ^ e_notice); Avoid the contradiction
This is irresponsible!
Where does your $offset assign value?
Since you do not have $offset = $_get[' offset ';
So how can the target offset be passed in?
Since can not pass, that page how to achieve? Line 63rd, line 3rd.

Now that you have extract ($_request);
Then $offset = $_get[' offset '); No need, let alone if it is a post form submission, there is no $_get[' offset '

You are under PHP5 to debug a project that is written according to PHP4 General work environment, then there are certain problems.
But you don't actually have the ability to modify the code, which can be seen from the problem of not resolving undefined variables.

In your first few posts, I have clearly told you: at the beginning of the program to add extract ($_request); You can do it.
The purpose of this is to: in the absence of magic variables, using the PHP4 project

As for the $php _self problem of this round, obviously you made it yourself!
If it is the original, then it is $PHP _self rather than $php _self (note: PHP variable name is case-sensitive)

Now that you have extract ($_request);
Then $offset = $_get[' offset '); No need, let alone if it is a post form submission, there is no $_get[' offset '

You are under PHP5 to debug a project that is written according to PHP4 General work environment, then there are certain problems.
But you don't actually have the ability to modify the code, which can be seen from the problem of not resolving undefined variables.

In your first few posts, I have clearly told you: at the beginning of the program to add extract ($_request); You can do it.
The purpose of this is to: in the absence of magic variables, using the PHP4 project

As for the $php _self problem of this round, obviously you made it yourself!
If it is the original, then it is $PHP _self instead of $php _self (note: PHP variable name is case-sensitive) moderator, I am absolutely admire you pleasantly surprised Ah! You will not only look at the code, but also look at people, but also you bother to write such a large section to teach me. I, I, I really was too touched!!!

Since you already have extract ($_request);
Then $offset = $_get[' offset '); no need, let alone if it is a post form submission, there is no $_get[' offset '

You are debugging a project that is written in php5 under the PHP4 general working environment. There are certain problems.
But you don't actually have the ability to modify the code, which can be seen from the problem of not resolving undefined variables

in your first few posts, I have explicitly told you: Add extract at the beginning of the program ($_request); it's fine.
The purpose of this is to: in the absence of magic variables, use PHP4 's project

As for this round of $php _self problem, obviously you made it!
If it is the original, then it is $PHP _self instead of $php _self (note: PHP variable name is case-sensitive) moderator, because of my level and grade problem, again and again very annoying every day in the forum to ask some mentally retarded questions, this is my graduation design, Was forced to have no way, around the classmate also did not PHP, in June 2 good defense before, the young woman may also bother you many times, hope you forgive me!

Now that you have extract ($_request);
Then $offset = $_get[' offset '); No need, let alone if it is a post form submission, there is no $_get[' offset '

You are under PHP5 to debug a project that is written according to PHP4 General work environment, then there are certain problems.
But you don't actually have the ability to modify the code, which can be seen from the problem of not resolving undefined variables.

In your first few posts, I have clearly told you: at the beginning of the program to add extract ($_request); You can do it.
The purpose of this is to: in the absence of magic variables, using the PHP4 project

As for the $php _self problem of this round, obviously you made it yourself!
If it is the original, then it is $PHP _self instead of $php _self (note: PHP variable name is case-sensitive) Big Brother I do not live you, indeed I changed the capitalization to lowercase, I now change back. But the system still prompts undefined variables, even I feel ashamed of myself

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.