Re: [請益] 有關使用者登入的問題??

看板PHP作者 (我在等...)時間19年前 (2006/01/11 09:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/3 (看更多)
※ 引述《alpe (我在等...)》之銘言: : ※ 引述《question7 (傻孩子才會馬哈哈)》之銘言: : : $count=0; while (odbc_fetch_row($result)){ 剛剛試了一下... 原來問題在這... while ($tmp = odbc_fetch_row($result)){ 如果 gettype(odbc_fetch_row($result)) ==> array(); 不管有沒有資料... 然後以下會造成... 只要有資料,就一定會過,不管資料筆數是否大於1 最多echo "wrong"; : : $count++; : 你放這... $count 一定會大於0啊... 放下面吧 : : if ($count>=1){ : : $sql="SELECT * From db1"; : : setcookie("ma",$ma); : : setcookie("pa",$pa); : : header("LOCATION:http://127.0.0.1/1/data.php"); : : } : : else { : : echo "WRONG!!"; : : }; : $count++ : : }; -- Live Long and Prosper -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 203.67.13.189
文章代碼(AID): #13n610PG (PHP)
文章代碼(AID): #13n610PG (PHP)