注册页面

<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 />进入页面";


?>
 

相关文章:

  • 2022-12-23
  • 2021-11-30
  • 2021-05-06
  • 2022-01-11
  • 2022-12-23
  • 2021-06-10
  • 2022-12-23
  • 2021-04-11
猜你喜欢
  • 2021-12-20
  • 2022-12-23
  • 2021-06-01
  • 2021-05-12
  • 2021-12-22
相关资源
相似解决方案