php简单用户验证代码,如下:
<html>
<head>
<title>用户验证-www.jb200.com</title>
</head>
<body>
<?php
if (isset($_POST["user"]) && isset($_POST["pass"]) &&
strtolower($_POST["user"]) == "shelley" && $_POST["pass"]
== "deadline") {
?>
Welcome!
<?php
} else {
?>
请登录:
<form method="post">
用户名: <input type="text" name="user" /><br />
密码: <input type="password" name="pass" /><br />
<input type="submit" name="验证用户登录" />
</form>
<?php
}
?>
</body>
</html>