I migrated website to new hosting but now I cannot login to admin. And I dont know why. Maybe problem with sessions? Anny help? This is part of code 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="-->" title="Log in" style="cursor:pointer" /> ');
print('</form>');
}
elseif($_SESSION["logged"])
{
if(!$subsection)
{
?>
... Content