Re: [問題]$_SERVER["PHP_SELF"]?
試試看$_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
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 4 之 4 篇):