php在讀取資料庫擷取資料時,ie8可以擷取到資料,chrome、360、ff等瀏覽器不能擷取資料
本帖最後由 vic90 於 2013-06-06 16:55:13 編輯
這是我的php的代碼,我要擷取資料表z_register的內容,用ie瀏覽器可以擷取的到,但是用chrome、360、FF等瀏覽器都擷取不到內容,用
chrome、360、FF等瀏覽器運行時,運行到mysql_fetch_array一句就彈出了,顯示登入失敗,應該要如何改啊?
$account=$_POST["account"];
$password=$_POST["password"];
$res=mysql_query("select * from z_register where z_account='".$account."' and z_password='".$password."'");
print_r($res);
if($result=mysql_fetch_array($res)){
mysql_query("update z_register set z_login_count = z_login_count+1 where z_account='".$account."'");
$_SESSION['account']=$account;
$_SESSION['username']=$result['z_name'].$result['z_title'];
//$_SESSION['login_count']=$result['z_login_count'];
refresh_page("./other/list.php");
}else{
exit('登入失敗!點擊此處 返回 重試
');
}
瀏覽器 php mysql
分享到:
------解決方案--------------------
沒有滿足的記錄所以就登陸失敗了,至於你說ie能正確,我懷疑你的ie有問題。
還有可能是編碼問題導致查詢不出結果