请救一个简单的登录问题? 可以用一个JS啊!这个方法最简单!http://www.baron.com.cn/javascript/ 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 随便写的,不完整,供参考,提供思路。登陆页面<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><title>管理</title><meta http-equiv="Content-Type" content="text/html; charset=gb2312"><link href="../main.css" rel="stylesheet" type="text/css"></head><body><p> </p><p> </p><table width="294" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="99CCFF" bgcolor="F2F8FF"> <tr> <td width="290" height="15" bgcolor="99CCFF"> <div align="center">管理员登陆</div></td> </tr> <tr> <td height="102"> <form name="form" method="post" action="login.php"> <table width="100%" height="54" border="0" cellpadding="0" cellspacing="0"> <tr> <td width="25%" height="28"><div align="center">管理员:</div></td> <td width="75%"><div align="center"> <input name="manager" type="text" id="manager" value="admin"> </div></td> </tr> <tr> <td><div align="center">密 码:</div></td> <td><div align="center"> <input name="password" type="password" id="password"> </div></td> </tr> <tr> <td colspan="2"><div align="center"><br> <input type="submit" name="Submit" value="提交"> <input type="reset" name="Submit2" value="重填"> </div></td> </tr> </table> </form></td> </tr> <tr> <td height="15" bgcolor="99CCFF"></td> </tr></table></body></html>这是验证文件<?php $pwd = "1234";$name = $_POST["name"];$password = $_POST["password"];if ($password == $pwd) { echo "<meta http-equiv=refresh content=\"0;URL=add.php\">";//跳转到加 //文章界面}else echo "<meta http-equiv=refresh content=0;URL=erro.htm>";//报错?> 一般来说是有个登陆界面。登陆之后就可以进行自己的管理了。没有权限进入的话,进转到其他页面去。你用dw mx吧那里面可以让你很简单实现登陆。 我帮你给吧~~~~name || password 借地请问要限制登陆空置时间不能超过1个小时要怎么做,这样为什么不可以呢? $PHPSESSID = session_id(); setcookie('PHPSESSID', $PHPSESSID, time()+14400,"/"); session_cache_expire(time()+14400); pear 里的 Auth 做的不错,可以借鉴 http://pear.php.net/manual/en/package.authentication.php php怎么调用一个类啊! 怎么样能让flash与数据库的连接起来???急啊 smarty循环二维数组 页面不刷新 十万火急:为什么我写的上传图片函数在本机测试正常,到服务器上不行? 提示Fatal error: This encoded file is corrupted. Please refer to 我是学delphi的,现在想学php,有没有一个好的可以快速掌握开发网站技巧的教程? 为什么,PHP可以在命令行调试? 在线等!!!初学者,请多关照!!! 请教高手,一个奇怪的问题 急!!!!odbc 连接MYSQL SERVER 错误 消息发布
<html>
<head>
<title>管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../main.css" rel="stylesheet" type="text/css">
</head><body>
<p> </p>
<p> </p>
<table width="294" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="99CCFF" bgcolor="F2F8FF">
<tr>
<td width="290" height="15" bgcolor="99CCFF"> <div align="center">管理员登陆</div></td>
</tr>
<tr>
<td height="102">
<form name="form" method="post" action="login.php">
<table width="100%" height="54" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="25%" height="28"><div align="center">管理员:</div></td>
<td width="75%"><div align="center">
<input name="manager" type="text" id="manager" value="admin">
</div></td>
</tr>
<tr>
<td><div align="center">密 码:</div></td>
<td><div align="center">
<input name="password" type="password" id="password">
</div></td>
</tr>
<tr>
<td colspan="2"><div align="center"><br>
<input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit2" value="重填">
</div></td>
</tr>
</table>
</form></td>
</tr>
<tr>
<td height="15" bgcolor="99CCFF"></td>
</tr>
</table>
</body>
</html>
这是验证文件
<?php
$pwd = "1234";
$name = $_POST["name"];
$password = $_POST["password"];
if ($password == $pwd) {
echo "<meta http-equiv=refresh content=\"0;URL=add.php\">";//跳转到加
//文章界面
}
else
echo "<meta http-equiv=refresh content=0;URL=erro.htm>";//报错
?>
登陆之后就可以进行自己的管理了。
没有权限进入的话,进转到其他页面去。
你用dw mx吧
那里面可以让你很简单实现登陆。
$PHPSESSID = session_id();
setcookie('PHPSESSID', $PHPSESSID, time()+14400,"/");
session_cache_expire(time()+14400);