How does this variable come from?

Source: Internet
Author: User
How does this variable come from this post? at last, lyhjc_2015 edited the if (isset ($ _ GET [n_page]) {& nbsp; & nbsp; & How does this variable come from?

This post was last edited by lyhjc_2015 at 09:02:41


In the following code, if (isset ($ _ GET ['n' _ page]) {// you can determine the current page number.
Of N_pageWhere did it come from? I checked out how it was not a field in a data table. Is it a casual definition?
 Session_start ();
Include_once ("conn/conn. php ");
?>





Untitled Document



Conference information browsing

$ Sqlview = "select * from tb_meeting_info ";
$ Num = 2; // maximum number of records per page
If (isset ($ _ GET ['n' _ page']) {// judge the current page number
$ C_page = $ _ GET ['n' _ page ']; // assign $ n_page to the variable $ c_apge.
} Else {
$ C_page = 1; // Initialization variable $ c_page
}
$ L_rst = $ conn-> PageExecute ($ sqlview, $ num, $ c_page); // execute the pageExecute function
$ Rst_view = $ conn-> execute ($ sqlview );
$ Record = count ($ rst_view-> GetRows (); // obtain the total number of records
If ($ record = 0 ){
Echo "no records currently ";
} Else {
?>

































While (! $ L_rst-> EOF ){?> $ L_rst-> movenext ();}?>
Meeting No. Meeting name Department name Meeting place Meeting Date Host Attendees Recorder Meeting Summary View details
Fields [0];?> Fields [1];?> Fields [2];?> Fields [3];?> Fields [4];?> Fields [5];?> Fields [6];?> Fields [7];?> Fields [8];?> Fields [0];?> ', '', 'Height = 720, width = 1004, scrollbars = no');">









Current is AbsolutePage ();?> Page/total LastPageNo ();?> Page


If (! $ L_rst-> AtfirstPage () {// if the current page is not the homepage
?>




"> Homepage
AbsolutePage ()-1);?> "> Previous Page

}
If (! $ L_rst-> AtlastPage () {// if the current page is not the last page
?>

AbsolutePage () + 1);?> "> Next page
LastPageNo ();?> "> Last Page


}
?> }
?>
Click here to export the report >>>






------ Solution ----------------------
It is actually from the "> homepage
This involves url-based value passing. when a link is uploaded to the address bar, the $ _ GET [] array intercepts it, because the $ _ GET [] array is a global variable array, intercepted values in the address bar.
Unfortunately, no one answered correctly.

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.