一个后台登陆,登录之后的页面为框架页

解决方案 »

  1.   


    if(!$loginId) {
        echo "<script>alert('您没登录,请先登录');history.go(-1);</script>";
    } else {
        echo "<script>location.href='/admin/index.php';</script>";
    }
      

  2.   


    <?php 
    if ($_POST['submit'])
    {
    //连接数据库 验证
    if(正确)
    {
    echo '<script>document.loaction.href="后台地址";</script>';
    }
    }
    ?>
    <form action="" method="post">
    用户名<input type="text" name="users"><br>
    密码<input type="password" name="paw"><br>
    <input type="submit" value="提交" name="submit">
    </form>