php用户登录页面代码源代码

php用户登录页面代码源代码


2024年5月8日发(作者:)

//登入页面

$conn=mysql_connect('127.0.0.1','root','')or die("连接失败");

mysql_select_db('tujian',$conn)or die("未找到该数据库");

define(ALL_PS,"vivid"); mysql_query("set names GBK");

if($_POST[submit]){

$postcode=strtolower($_POST["code"]);

$postcode=strtoupper($_POST["code"]);

$uid=str_replace(" ","",$_POST[uid]);

$sql="select * from users where `uid`='$_POST[uid]'";

$query=mysql_query($sql);

$user=is_array($row=mysql_fetch_array($query));

$mi=$user?md5($_POST[pass].ALL_PS)==$row[pass]:FALSE;

if($mi){

$_SESSION[uid]=$row[uid];

$_SESSION[name]=$row[name];

$_SESSION[id]=$row[id];

$_SESSION[user_shell]=md5($row[uid].$row[pass].ALL_PS);

if( $_SESSION["code"]==$postcode){

echo"";

}else{

echo"

验证码输入错误,请重新输入!
";

}

}

else{

echo"

用户名或密码输入错误
";

session_destroy();

}

}

>

用户登录

Checklogin();">

bgcolor="#ffffff">

欢迎

登录

 

onblur="if (value=='')

{value='账号'}" name="uid" style="width:180px;height:25px;color:#939597;"/>

 

 

onblur="if (value=='')

{value='密码'}" name="pass"

style="width:180px;height:25px;color:#939597;"/>

  

  

onblur="if (value=='')

{value='验证码'}" name="code"

style="width:80px;height:25px;color:#939597;"/>

填写下图所示文字

/>

        

src="?" alt="点击刷新" onClick="=+'?'" />

size="20px"style="color:#867e82;font-size:10pt;">看不清?点击图片刷新

 

height:39px; width:110px; font-size: 24px; font-style: inherit; font-weight:

normal;color:#fff" value="登入"/>

 

土建学院交流平台

class="STYLE9"> 登 录 界 面

 

 

 

 


发布者:admin,转转请注明出处:http://www.yc00.com/news/1715133356a2571020.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信