推广 热搜: 行业  机械  设备    经纪  系统  参数  教师    蒸汽 

php用户登录代码(手机php代码编辑器方法)

   日期:2022-04-30     移动:http://mip.xhstdz.com/quote/4912.html

注册页面

<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=”sex”> </div>

<div>生日:<input type=”text” name=”birthday”> </div>

<input type=”submit” value=”注册”/>

</form>

</body>

<?php

$uid = $_POST[“uid”];

$pwd = $_POST[“pwd”];

$name = $_POST[“name”];

$sex = $_POST[“sex”];

$birthday = $_POST[“birthday”];

include (“LZY.class.php”);

$db = new LZY();

$sql = “insert into zhuce VALUES (‘{$uid}’,'{$pwd}’,'{$name}’,'{$sex}’,'{$birthday}’,0)”;

if($db->query($sql,0))

{

header(“location:zhuceyemiandenglu.php”);

}

else

{

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 = “select * from zhuce where uid='{$uid}'”;

$arr = $db->Query($sql);

if($arr[0][1] == $pwd && !empty($pwd))

{

if($arr[0][5])

{

header(“location:zcmain.php”);

}

else

{

echo “该用户尚未通过审核!”;

}

}

else

{

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 = “select * from zhuce”;

$arr = $db->Query($sql);

foreach($arr as $v)

{

$str = $v[5]?”<span style=’background-color:green’>已通过</span>”:”<a href=http://www.wfb2b.com/news/’zctongguo.php?uid={$v[0]}’>通过</a>”;

echo “<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 set isok=1 where uid='{$uid}'”;

if($db->Query($sql,0))

{

header(“location:zcmain.php”);

}

else

{

echo “通过失败!”;

}

本文地址:http://sjzytwl.xhstdz.com/quote/4912.html    物流园网 http://sjzytwl.xhstdz.com/ , 查看更多

特别提示:本信息由相关企业自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


0相关评论
相关行业动态
推荐行业动态
点击排行
网站首页  |  关于我们  |  联系方式  |  使用协议  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号