newman
(newman)
新手上路

初级会员
UID 19682
精华
0
积分 7
帖子 7
金钱 7 喜悦币
威望 0
人脉 0
阅读权限 10
注册 2003-4-17
状态 离线
|
[广告]: Enom域名自助付费 自助注册 自助PUSH 主流域名COM等一律57.99元年
请教一个初级的数据库读写问题~ 急!
为什么每次输入正确的管理员密码一样的要提示不是管理员呢?
请各位大虾给个提示,看了很长时间了,仍然没有结果!!
if($user=="")
{require "sendstyle.php";
print "错误:你还没有输入管理员帐号!<a href='javascript:history.go(-1)'>返回</a>";
die();}
elseif($password==""){
require "sendstyle.php";
print "错误:你还没有输入管理员密码!<a href='javascript:history.go(-1)'>返回</a>";
die();}
else{
$query=mysql_query("select * from usr");
while ($myrow=mysql_fetch_array($query)){
$user=$myrow["user"];
$pwd2=$myrow["password"];
echo $user;echo "&&";
echo $pwd2;echo "&&";
}
if($password!=$pwd2)
{require "sendstyle.php";
print "<br>错误:你不是本网站的管理员<a href='javascript:window.close()'>快快退出</a>!";
die();
}}
$query = mysql_query("delete from 'usr' where id='$id1'");
$insert= mysql_query("insert into usr (user,password)values('$user2','$password2')");
$result = mysql_query($query);
require "sendstyle.php";
print "< ALIGN = CENTER>更改成功!
<a href='javascript:window.close()'>关闭窗口";
print "</a><BR>";
|
|