Why can't php form submission be submitted in get mode but in post mode? Wait until the php form submission is submitted in get mode, but not in post mode:
Notice: Undefined index: form in C: \ xampp \ htdocs \ index. php on line 2;
That is to say, the post method fails to pass the value. it cannot be understood that the directory is under the c: xampp/htdocs directory.
Thank you very much for your answers.
Html source code:
Document
Php source code:
1 2 echo 'hello: '. $ _ GET ['form'];
3?>
Reply to discussion (solution)
No form control named form
Html source code:
Document
Php source code:
$ Name = $ _ POST ["abc"];
Echo $ name;
?>
You can change it like this.
Your form is submitted by post, and $ _ GET is used when you take the form.
No form control named form
Form method is post
And when you receive it, you do get
Isn't that a problem?
1. the echo 'hello: '. $ _ GET ['form'] you obtained on the php page; you can use POST to get the value. this is problem 1.
2. form is the form id. I think you want to obtainYou can set a name for it.Then echo 'hello: '. $ _ POST ['id'] on the php page;
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.