我有这样的代码:PHP和get方法错误
<?php
if ($_GET["do"]=="success") {
echo "SUCCESS";
}
?>
<form action="file.php?do=success" method="post">
<input type="text"><input type="submit">
</form>
而且我得到这个错误:
Notice: Undefined index: do in C:\Program Files\EasyPHP-5.3.8.1\www\m\file.php on line 2
什么我需要做什么?
你可能想瞄了一眼[PHP的error_reporting(HTTP:/ /php.net/manual/en/function.error-reporting.php) – budwiser
@budwiser:是不是已报告的错误?还是你建议压制这些错误并假装它从未发生过? :P – PeeHaa
@budwiser鉴于OP看到了'E_NOTICE'错误,我想说他已经掌握了它 – Phil