Re: [問題]$_SERVER["PHP_SELF"]?

看板PHP作者 (好人都來自於==>)時間17年前 (2007/02/13 00:53), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
試試看$_POST['name'] 因為php 4.2以前的版本是可以用HTTP_POST_VAR沒錯 不過為了安全性現在幾乎都把register_globals設成Off [php.ini] 如果你懶得改很多行,就把設定打開吧 : <?php : if (isset($HTTP_POST_VARS["name"]) && isset($HTTP_POST_VARS["security_try"])) : { : //Connect to database : mysql_connect("localhost", "username", "password"); : mysql_select_db("dw_php"); : //Set variables, and call checkSecurityImage : $security_refid = $HTTP_POST_VARS["security_refid"]; : $security_try = $HTTP_POST_VARS["security_try"]; : $checkSecurity = checkSecurityImage($security_refid, $security_try); : //Depending on result, tell user entered value was correct or incorrect : if ($checkSecurity) { : $validnot = "correct"; : } else { : $validnot = "incorrect"; : } : //Write output : echo("<b>You entered this as the security text:</b><br>\n : ".$security_try."<br>\n : This is ".$validnot.".<br>\n : -------------------------------<br><br>\n : "); : } : ?> : 所以我不知道他的驗證結果是錯誤還是正確 : 請問各位大大 : 要怎樣才能讓他跑出驗證結果 : 再次麻煩各位大大了 : 謝謝各位大大的幫忙 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 218.174.209.144
文章代碼(AID): #15q9kUrt (PHP)
文章代碼(AID): #15q9kUrt (PHP)