Re: [請益] 有關使用者登入的問題??
※ 引述《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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 3 之 3 篇):
PHP 近期熱門文章
PTT數位生活區 即時熱門文章