作者shooding (好人都来自於==>)
看板PHP
标题Re: [问题]$_SERVER["PHP_SELF"]?
时间Tue Feb 13 00:53:49 2007
试试看$_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