Can you tell me how PHP gets the value of HTML variables in the same file?

Source: Internet
Author: User
Ask the same file how PHP gets the value of the HTML variable?
This post was last edited by Zhouxicai on 2015-04-29 10:56:49

The code is as follows:


Configurator


Please set the properties you want to modify:




echo "
Test Connect.

Echo ($JB);
Echo ($JB);
Echo ($JY);
?>




An error appears after the browser opens the index.php page

notice:undefined VARIABLE:JB in C:\Program Files (x86) \easyphp-devserver-14.1vc11\data\localweb\command.php on line 32

notice:undefined VARIABLE:JB in C:\Program Files (x86) \easyphp-devserver-14.1vc11\data\localweb\command.php on line 33

notice:undefined Variable:jy in C:\Program Files (x86) \easyphp-devserver-14.1vc11\data\localweb\command.php on line 34

How do I get the value of the HTML variable in the PHP code?
------to solve the idea----------------------
I am afraid to use JS to get it, you this value is dynamic, or Ajax to the background PHP page
------to solve the idea----------------------
Your code is old, it's PhP4 's early code.
In order to execute correctly prior to PHP 5.3, the following settings are required
Register_globals = On
error_reporting = E_all & ~e_notice

php5.4 start canceling the register_globals switch, your code will not be modified to run correctly

If you do not want to modify the php.ini file, you do not want to change the original code
Then at least at the beginning of the program, add the following code
Error_reporting (e_all ^ e_notice);
Extract ($_get);


  • 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.