Home  >  Article  >  Backend Development  >  PHP交付form遇到语法报错

PHP交付form遇到语法报错

WBOY
WBOYOriginal
2016-06-13 10:33:23880browse

PHP提交form遇到语法报错
我的form是这么写的,目的是在同一页面完成数据更新,所以用了:action="test.php?action=add"

PHP code
《内容省略》


然后捕捉该FORM的action:

PHP code


然后,在浏览器测试,报错:

  Notice: Undefined index: Action in D:\setup\xampp\htdocs\test.php on line 133
《这一行的内容正是:if($_GET["Action"]=="Add")》

查了很久,不知道是哪里错了。



------解决方案--------------------
第一个 传递get 的话要像 3楼这么改
第二个传递的值需要写

if(isset($_GET["action"]))
这么进行判断

那个是一个提示 ,修改后提示就会消失。如果你不修改 修改php.ini的出错提示等级也可以达到目的。
------解决方案--------------------
探讨

引用:
if($_GET["action"]=="Add")


不行!还是报错
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