[code={php}]
<?php
include("images/conn.php");
$user=$_POST['user'];
$pwd=$_POST['pwd'];
$pwd1=$_POST['pwd1'];
if($_POST['submit'])
{
$db=db_connect();
    $sql="select*from user where username='$user' and password='$pwd'";
$rs=$db->query($sql);
$row=mysqli_num_rows($rs);
      if('$user'==username && '$pwd'==password)
{
  $db=db_connect();
  $sql1="update user SET password='$pwd1' where username='$user'";
  $rs1=$db->query($sql1);
  if($rs1)
{
              echo "cg";
}
else
{
echo "shibai";
}
}
//else
//{
// echo "修改失败";
//}
$db->close();
}
?>
<form id="form1" name="form1" method="post" action="xiugai.php">
  <p>用户账号:
    <input type="text" name="user" /><br/>
    原始密码:<input type="text" name="pwd" /><br/>
    新的密码:<input type="text" name="pwd1" /><br/>
    <input type="submit" name="submit" value="提交"/>
  </p>
</form>
[/code]
我的代码有什么错误
什么也没报错,提交后没什么反映,数据库里面修改不了