Home >Backend Development >PHP Tutorial > 新手提问:如何改变get的内容,页面没有改变

新手提问:如何改变get的内容,页面没有改变

WBOY
WBOYOriginal
2016-06-13 12:29:40809browse

新手提问:怎么改变get的内容,页面没有改变啊

<br />
<?php<br />
require 'Inc/function.php';<br />
header("Expires:-1");<br />
header("Cache-Control:no-cache");<br />
header("Pragma:no-cache");<br />
<br />
$user=$_POST["user"];<br />
if (isset($user)){<br />
	echo("0||");<br />
	}<br />
else{	<br />
	$con = mysql_connect(DBHOST,DBUSER,DBPW);<br />
	if (!$con)<br />
	  {<br />
	  die('数据库连接出错: ' . mysql_error());<br />
	  }<br />
	<br />
	mysql_select_db(DBNAME, $con);<br />
	<br />
	$result = mysql_query("SELECT uid,password,salt FROM `pre_ucenter_members` where username='".checkstr(user)."'");<br />
	mysql_close($con);<br />
	<br />
	$row=mysql_fetch_row($result);<br />
	echo("$row[0]|$row[1]|$row[2]");<br />
}<br />
?><br />


这个页面执行一次以后,再次执行,修改?user=后面的参数,执行结果没有任何变化。$user=$_POST["user"];
改为
$user=$_GET["user"];

你不是用POST接收的吗?改?user=后面参数,对POST没有影响啊

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn