PHP会员系统(5)-后台登陆页面
这些教程来源于中国教程网 欢迎转载,转载本站文章请注明!否则必定追究责任!
如果你需要这个系统的代码请加入中国教程网PHP群:8920718
http://www.cnjiaocheng.com
admin_login.php页面代码如下
http://www.cnjiaocheng.com
<?php /* @web 管理员登陆 @author yangfan @2007/12/19/9:40 @keyword 登陆 */ //连接数据库 include ("config.php"); //点击提交 if($submit){ //获取表单传递过来的值 $username = $_POST['username']; $password = $_POST['password']; $o = "SELECT * FROM admin where username = '$username' AND password = '$password' "; $r = mysql_query($o); $i = 0; while($row=mysql_fetch_object($r)){ $i++; } if($i!=0){ 来源中国教程网 ?> <html> <head> <title>管理员登陆</title> </head> <body> 管理员登陆: <hr size="1" color="#000" width="50%"align="left"> <form action="admin_login.php" method="POST"> 用户名: <input type="text" name="username" id="username" size="15"><br> 密 码: <input type="password" name="password" id="password" size="15"><br> <input type="submit" name="submit" id="submit" value="登陆"> <input type="reset"> </form> </body>
来源中国教程网
http://www.cnjiaocheng.com
</html>
来源中国教程网
header("location:admin_index.php"); } } |
http://www.cnjiaocheng.com