<html>
<body>
<form name="form1" method="post" action="">
<table width="352" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="352" height="30"> 用户名:
<input name="user" type="text" size="12">
密码:
<input name="pwd" type="password" id="pwd" size="12">
<input name="submit" type="submit" id="submit" value="登录"></td>
</tr>
</table>
</form>
<?php
//~ function _post($str){
//~ $val = !empty($_POST[$str]) ? $_POST[$str] : null;
//~ return $val;
//~ }
if(!empty($_POST["submit"]) && $_POST["submit"]=="登录")
{
$user = $_POST["user"];
$pwd = $_POST["pwd"];
echo "<br \>user=$user password=$pwd";
}
?>
</body>
</html>
php 解决Notice: Undefined index:
最新推荐文章于 2021-10-17 17:53:44 发布