注册页面
<body >
<h1>注册页面</h1>
<form action=”zhucechuli.php” method=”post”>
<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=”x”> </div>
<div>生日:<input type=”text” name=”birthday”> </div>
<input type=”submit” value=”注册”/>
</form>
</body>
<?php
$uid = $_post[“uid”];
$pwd = $_post[“pwd”];
$name = $_post[“name”];
$x = $_post[“x”];
$birthday = $_post[“birthday”];
include (“lzy.class.php”);
$db = new lzy();
$sql = “inrt into zhuce values (‘{$uid}’,'{$pwd}’,'{$name}’,'{$x}’,'{$birthday}’,0)”;
if($db->query($sql,0))
{
header(“loc希望的诗句ation:zhuceyemiandenglu.php”);
}
el
{
echo “注册失败!”;
}
<body>
<h1>页面登录</h1>
<form action=”zcdlchuli.php” method=”post”>
<div>用户名:<input type=”text” name=”uid”/> </div>
<div>密 码:<input type=”password” name=”pwd”/></div>
<div><input type=”submit” value=”登录”/> </div>
</form>
</body>
<?php
$uid = $_post[“uid”];
$pwd = $_post[“pwd”];
include (“lzy.class.php”);
$db = new lzy();
$sql = “lect * from zhuce where uid='{$uid}’”;
$arr = $db->query($sql);
if($arr[0][1] == $pwd && !empty($pwd))
{
if($arr[0][5])
{
header(“location:zcmain.php”);
}
el
{
echo “该用户尚未通过审核!”;
}
}
el
{
echo “登录失败!”;
}
<body>
<h1>用户审核</h1>
<table width=”100%” border=”1″ cellpadding=”0″ cellspacing=”0″>
<tr>
<td>用户三大历史任务名</td>
<td>姓名</td>
<td>性别</td>
<td>生日</td>
<td>操作</td>
</tr>
<?php
include(“lzy.class.php”);
$db = new lzy();
$sql = “lect * from zhuce”;
$arr = $db->query($sql);
foreac浙江大学农业与生物技术学院h($arr as $v)
{
$str = $v[5]?”<span style=’background-color:green’>已通过</span>”:”<a href=’zctongguo.php?uid={$v[0]}’>通过</a>”;
ec向上向善ho “<tr>
<td>{$v[0]}</td>
<td>{$v[2]}</td>
<td>{$v[3]}</td>
<td>{$v[4]}</td>
<td>{$str}</td>
</tr>”;
}
?>
</table>
</body>
</html>
审核通过代码
<?php
$uid = $_get[“uid”];
include(“lzy.class.php”);
$db = new lzy();
$sql = “update zhuce t isok=1 where uid='{$uid}’”;
if($db->query($sql,0))
{
header(“location:zcmain.php白帆和木桨”);
}
el
{
echo “通过失败!”;
}
本文发布于:2023-04-05 23:52:37,感谢您对本站的认可!
本文链接:https://www.wtabcd.cn/fanwen/zuowen/29771892eb3c6e0082ad8536202cd1b9.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文word下载地址:php用户登录代码(手机php代码编辑器方法).doc
本文 PDF 下载地址:php用户登录代码(手机php代码编辑器方法).pdf
| 留言与评论(共有 0 条评论) |