我正在尝试整理我正在制作的网络应用程序上的查询,该查询一直失败,我不知道为什么!代码如下:
$update = $_GET['update'];
if($update == "true"){
$setDetails="UPDATE users SET email='{$_POST['email']}', api_key='{$_POST['api_key']}', api_secret='{$_POST['api_secret']}' WHERE username={$_POST['username']}";
if(mysql_query($setDetails)){
$updatemsg = '<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a><strong>Success!</strong> Your details have been updated in our database.</div>';
}else{
$updatemsg = '<div class="alert alert-error"><a href="#" class="close" data-dismiss="alert">×</a><strong>Failure!</strong> Your details could not be updated in our database. Please try again later or contact us if this keeps happening.</div>';
}
}else if($update == "false"){
$updatemsg = '<div class="alert alert-success"><a href="#" class="close" data-dismiss="alert">×</a><strong>Success!</strong> Your changed were discarded.</div>';
}
任何想法,帮助或提示?请注意,在我的网络应用程序的下方,我的网络应用程序SELECT * FROM users WHERE username='$username'
运行良好,因此数据库连接没有问题。