迁移后无法登录

时间:2017-05-05 09:54:57

标签: php login

我将网站迁移到新托管但现在我无法登录管理员。我不知道为什么。 会议有问题吗?安妮有帮助吗? 这是代码admin.php

的一部分
<?php
include("auth/data/functions.php");
//$_SESSION["logged"] = true;
if (isset($_POST["auth_login"])) {
    if($_POST["auth_login"]&&$_POST["auth_password"])
    {
        if (mysql_result(mysql_query("SELECT COUNT(*) FROM `admin` WHERE name = '".addslashes($_POST['auth_login'])."' AND password = '".sha1($_POST["auth_password"])."'"), 0)) 
        {
            $_SESSION["logged"] = true;
        }
    }
}

if (!isset($_SESSION["logged"]))
{
    print('
                <h1>Log in</h1>
');
    if (isset($_POST["auth_login"])) {
        print('<p>Error. Wrong username or password.</p>');
    }
    print('<br><form method="post">');
    print('<label for="name">Name: </label><input name="auth_login" maxlength="30" id="name" /> ');
    print('<label for="pass">Password: </label><input type="password" name="auth_heslo" id="pass" /> ');
    print('<input type="submit" value="--&gt;" title="Log in" style="cursor:pointer" /> ');
    print('</form>');
}

elseif($_SESSION["logged"])
{
    if(!$subsection)
    {
?>

... Content

0 个答案:

没有答案
相关问题