PHP sürümünü değiştirdikten sonra admin panelime giremiyorum. Giriş formunda bilgilerin doğrulanmadığı hatasını veriyor fakat bilgiler doğru. Kodlar daha önce hosttada localhosttada sorunsuz çalışırken şimdi localhostta heryerden hata veriyor.
Giriş sayfası aşağıda:
<?php
define('_DIRECT', false);
@session_start();
ob_start();
include("../data/connect.php");
include("../configurations.php");
include("language/$adminlang.php");
include("functions/functions.php");
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $adminlang; ?>" lang="<?php echo $adminlang; ?>" >
<head>
<title><?php echo GEN1; ?></title>
<base href="<?php echo $baseurl; ?>/hqwyz8/" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="style/style.css" type="text/css" />
</head>
<body onLoad="document.login.username.focus();">
<div class="logincontainer">
<?php
if(isset($_POST['login'])) :
$user = htmlspecialchars($_POST['username'],ENT_QUOTES);
$password = htmlspecialchars($_POST['pass'],ENT_QUOTES);
if((!$user) || (!$password))
{
$loginerror='<div class="loginerror">Please enter correct login informations.</div>';
}
else
{
$securepass = md5(sha1('$password'));
$sql = mysql_query("select id, username, level from member where (username='$user') and (pass='$securepass') and (activation='1') and (app='1')");
$sql2 = mysql_num_rows($sql);
if ($sql2 > 0)
{
while($query = mysql_fetch_assoc($sql)) {
$_SESSION['username']=$user;
$_SESSION['userid']=$query['id'];
$_SESSION['level']=$query['level'];
}
if ($_SESSION['level']=='1') {
header('Location: game.php');
}
else {
$loginerror='<div class="loginerror">You are not allowed to view this area.1</div>';
}
}
else
{
$loginerror='<div class="loginerror">You are not allowed to view this area.2</div>';
}
}
endif;
if(!isset($_POST['login']) or $loginerror!='') :
?>
<form name="login" action="<?php $_SERVER['PHP_SELF'] ?>" method="post">
<table class="apanelinfo" cellpadding="0" cellspacing="0">
<tr><td><?php echo USER2; ?></td><td><input type="text" name="username" /></td></tr>
<tr><td><?php echo USER7; ?></td><td><input type="password" name="pass" /></td></tr>
<tr><td colspan="2"><input type="submit" class="apanelbut" name="login" value="<?php echo USER14; ?>" /></td></tr></table></form>
<?php
echo $loginerror;
endif; ?>
</div>
</body>
</html>
<?php
mysql_close($conn);
ob_end_flush();
?>Verdiği hatada bu:Notice: Undefined variable: loginerror in C:\wamp\www\...\...\index.php on line 72Bu satira denk gelen kod:
echo $loginerror;nasil duzeltirim bu hatalari. Dun admin paneline giris yapabiliyordum ve bunun gibi bir suru hata veriyordu fakat bugun admine giriste yapamiyorum.