For a newbie, the Code is as follows. It is okay to change post to get, but if it is post, it will prompt Notice: Undefinedindex: ainD: xampphtdocsmyphpadd.phponline3add.html {code ...} add. php {code ...} for a newbie, the Code is as follows. It is okay to change post to get, but if it is post, it will prompt
Notice: Undefined index: a in D: \ xampp \ htdocs \ myphp \ add. php on line 3
Add.html
Title
Add. php
Reply content:
For a newbie, the Code is as follows. It is okay to change post to get, but if it is post, it will prompt
Notice: Undefined index: a in D: \ xampp \ htdocs \ myphp \ add. php on line 3
Add.html
Title
Add. php
I am also a similar problem. There is only one possibility that the port configured by phpstrom does not match the phpinfo () port. Let's take a look. Phpinfo ()?> For example, localhost, configure phpstrom-> Tools-> Dployment-> Configuration->
Create a new file, such as Name = localhost, and set the Web sever root url to http: // localhost. The port must be consistent with the phpinfo () port.
Set enable_post_data_reading to On in php. ini to automatically enter the POST data in the $ _ POST array.
; Whether PHP will read the POST data.; This option is enabled by default.; Most likely, you won't want to disable this option globally. It causes $_POST; and $_FILES to always be empty; the only way you will be able to read the; POST data will be through the php://input stream wrapper. This can be useful; to proxy requests or to process the POST data in a memory efficient fashion.; http://php.net/enable-post-data-reading; enable_post_data_reading = Off
To determine whether to enter the values of a and B, use:
isset($_POST['a']) && isset($_POST['b']
When you input 0 values for a or B, the Branch is not added.
Print$_REQUESTArray,
If you check whether there is any data POST, we recommend that you print the data before processing the business.
You can directly
var_dump($_POST);
Check whether there is a value.
There are several methods to submit a post. How do you see it?
Php configuration problems