Home  >  Article  >  Backend Development  >  php表单提交为什么用get方式可以提交而post方式却不可以提交

php表单提交为什么用get方式可以提交而post方式却不可以提交

WBOY
WBOYOriginal
2016-06-20 12:38:02858browse

php表单提交为什么用get方式可以提交获取值而post方式却不可以获取,一直显示:
Notice: Undefined index: text in C:\xampp\htdocs\phpstrom\hello.php on line 2;
就是说post方式传值失败,不太理解,目录是在c:xampp/htdocs目录下的。

POST方式:
HTML源码:
nbsp;html>


    
    Document



    
    




PHP源码:
echo  $_POST["abc"] ;
?>


回复讨论(解决方案)

Notice: Undefined index:  text in ....
表单中只有


    
    

写错了  我把text改成了abc ,前面忘记了改 Notice: Undefined index: abc in C:\xampp\htdocs\phpstrom\hello.php on line 2;

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn