现在我停留在更新密码区域,我尝试输入新密码,然后我单击更新按钮但在数据库未更新,这里的任何人都可以帮助我错误在哪里?
这是我的更新声明
$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
$editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_POST["MM_update"])) && ($_POST["MM_update"] == "form1")) {
$updateSQL = sprintf("UPDATE user SET password=%s WHERE password_hidden=%s",
GetSQLValueString($_POST['password'], "text"),
GetSQLValueString($_POST['password_hidden'], "text"));
这是我的表格
<form method="POST" name="form1" action="<?php echo $editFormAction; ?>">
<table border="0" align="center">
<tr>
<td width="130"><span class="style5">New Password</span></td>
<td width="15"><div align="center" class="style5">:</div></td>
<td ><label><input name="password" type="password" id="password" tabindex="1" value="<?php echo $row_chgpswd['password']; ?>" size="20" />
<input name="password_hidden" type="hidden" value="<?php echo $row_chgpswd['password_hidden']; ?>" />
</label>
</td>
</tr>
<tr>
<td height="26"> </td>
<td> </td>
<td><div align="right">
<input type="submit" name="button" id="button" value="Change Password" tabindex="3"/>
</div>
</td>
</tr>
</table>
<input type="hidden" name="MM_update" value="form1">
</form>