session_start();
include("db.php");
$hesap = mysql_fetch_array(mysql_query("SELECT * FROM m_hesap where id = 1"));
$_SESSION['control'] = false;
if($_SESSION['control'] != true) {
if(@$_POST['user'] == $hesap[1] && @$_POST['pass'] == $hesap[2]) {
$_SESSION['control'] = true;
}
}
if($_SESSION['control'] == true) {
header('Location: kategoriler.php');
}
如果我寫@ $ _ POST ['user'] =='admin'和@ $ _ POST ['pass'] =='pass',Everythin是可以的。我的登錄腳本有什麼問題
但是當我寫了@ $ _ POST ['user'] == $ hesap [1]和@ $ _ POST ['pass'] == $ hesap [2]和上面的代碼一樣,我無法登錄系統。我採取與$ _ POST變量informationt是真實的,但我無法登錄系統
var轉儲您的$ hesap,你會看到你的問題 – Ibu
我轉儲$ hesap和信息是真的 – makcbn
可能是一個錯字問題,但不確定SELECT * FROM m_hesap WHERE id ='1' – Warface