<?phprequire 'Inc/function.php';header("Expires:-1");header("Cache-Control:no-cache");header("Pragma:no-cache");$user=$_POST["user"];if (isset($user)){ echo("0||"); }else{ $con = mysql_connect(DBHOST,DBUSER,DBPW); if (!$con) { die('数据库连接出错: ' . mysql_error()); } mysql_select_db(DBNAME, $con); $result = mysql_query("SELECT uid,password,salt FROM `pre_ucenter_members` where username='".checkstr(user)."'"); mysql_close($con); $row=mysql_fetch_row($result); echo("$row[0]|$row[1]|$row[2]");}?>
$user=$_POST["user"];
改为
$user=$_GET["user"];
你不是用POST接收的吗?改?user=后面参数,对POST没有影响啊
谢谢楼上的。代码修正为:
<?phprequire 'Inc/function.php';header("Expires:-1");header("Cache-Control:no-cache");header("Pragma:no-cache");$user=$_GET["user"];if (!isset($user)){ echo("0||"); }else{ $con = mysql_connect(DBHOST,DBUSER,DBPW); if (!$con) { die("0||"); //die('数据库连接出错: ' . mysql_error()); } mysql_select_db(DBNAME, $con); $result = mysql_query("SELECT uid,password,salt FROM `pre_ucenter_members` where username='".checkstr($user)."'"); mysql_close($con); $row=mysql_fetch_row($result); echo("$row[0]|$row[1]|$row[2]");}?>