<?php
教学网页:http://www.php.cn/code/1040.html#code_down_li
这行代码在phpstorm中一直报错:
C:\xampp\php\php.exe "D:\Yangsipeng\code\PS php CODE\reg.php"
PHP Notice: Undefined index: username in D:\Yangsipeng\code\PS php CODE\reg.php on line 3
Notice: Undefined index: username in D:\Yangsipeng\code\PS php CODE\reg.php on line 3
PHP Notice: Undefined index: pwd in D:\Yangsipeng\code\PS php CODE\reg.php on line 7
<br />
Notice: Undefined index: pwd in D:\Yangsipeng\code\PS php CODE\reg.php on line 7
<br />
Process finished with exit code 0
网页中打开也是一样的提示 html文件是按教学写的 两个文件也放在一起了
//$_GET后面加上中括号,将username作为字符串放在中括号里面,就得到了表单里面的<input type="text" name="username" /> 的值
$u = $_GET['username'];
echo $u.'<br />';
//$_GET['pwd'] 得到表单<input type="text" name="username" /> 的值
$passwd = $_GET['pwd'];
echo $passwd.'<br />';
?>