注册页面
<html>
<body>
<h1 align="center">注册表格</h1>
<form action="zcchuli.php" method="post">
<div align="center">
<div>用户名<input type="text" name="uid"/></div>
<div>密码<input type="text" name="pwd"/></div>
<div>姓名<input type="text" name="name"/></div>
<div>性别<input type="text" name="sex"/></div>
<div>生日<input type="text" name="birthday"/></div>
<div><input type="submit" value="提交注册"/></div>
</div>
</form>
</body>
</html>
注册处理
zcchuli.php
<?php
登录页面
login.php
<html>
<body>
<br />
<h3>登录页面</h1>
<form action="lgchuli.php" method="post">
<div>用户名:<input type="text" name="uid" /></div>
<div>密码:<input type="text" name="pwd" /></div>
<div><input type="submit" value="登录" /></div>
</form>
</body>
</html>
登录处理
lgchuli.php
<?php
$uid = $_POST["uid"];
$pwd = $_POST["pwd"];
include("Tp.class.php");
$db = new Tp();
$sql = "select count(*) from Users where Uid = '{$uid}' and Pwd= '{$pwd}' and Isok=1";
$z = $db->StrQuery($sql);
if($z == 1)
{
header("location:xianshi.php");
}
else
{
header("location:login.php");
}
xianshi.php
<?php
echo "登录成功!!!!!!!<br />进入页面";
?>