新手提问:怎么改变get的内容,页面没有改变啊 $user=$_POST["user"];改为$user=$_GET["user"]; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 你不是用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]");}?>我犯了两个低级错误。除了post改get以外,checkstr(user)改为checkstr($user)执行正常了 ie6下 js加载问题 preg_replace 关于ajax php连接失败处理 php有框架和MVC吗? 急问:我写的SQL语句错了,该怎样改?(在线等) php 创建excel文件时如何加粗、设置字体、设置背景色? 初学:什么叫PHP?它有什么作用? 数据库权限问题 设计function find_max($a,$b,$c),用最少的代码,返回三个浮点数中最大的值,感谢帮忙,在线等 php批量修改问题 为什么无法输出一张图片
require '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]");
}
?>
我犯了两个低级错误。除了post改get以外,
checkstr(user)改为checkstr($user)
执行正常了