可以用一个JS啊!这个方法最简单!
http://www.baron.com.cn/javascript/

解决方案 »

  1.   

    随便写的,不完整,供参考,提供思路。登陆页面<!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>&nbsp;</p>
    <p>&nbsp;</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">密&nbsp;&nbsp;码:</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="提交">
                    &nbsp;&nbsp;
    <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>";//报错
    ?>
      

  2.   

    一般来说是有个登陆界面。
    登陆之后就可以进行自己的管理了。
    没有权限进入的话,进转到其他页面去。
    你用dw mx吧
    那里面可以让你很简单实现登陆。
      

  3.   

    我帮你给吧~~~~name || password
      

  4.   

    借地请问要限制登陆空置时间不能超过1个小时要怎么做,这样为什么不可以呢?
          $PHPSESSID = session_id(); 
          setcookie('PHPSESSID', $PHPSESSID, time()+14400,"/"); 
          session_cache_expire(time()+14400);
      

  5.   

    pear 里的 Auth 做的不错,可以借鉴 http://pear.php.net/manual/en/package.authentication.php