作者:djw | 来源:互联网 | 2023-05-16 03:25
SoIhavethisupdatestatementwhichwhenIdumpthe$_POSTvariables.,IgettheoutputsIwant.我
So I have this update statement which when I dump the $_POST variables., I get the outputs I want.
我有一个更新语句当我转储$_POST变量时。得到我想要的输出。
$stmt = $dbConnectionW->prepare("UPDATE members SET
fname='". mysqli_real_escape_string($dbConnectionW, $_POST['fname']) ."',
sname='". mysqli_real_escape_string($dbConnectionW, $_POST['sname']) ."',
gender='". mysqli_real_escape_string($dbConnectionW, $_POST['gender']) ."',
natiOnality='". mysqli_real_escape_string($dbConnectionW, $_POST['nation']) ."',
year='". mysqli_real_escape_string($dbConnectionW, $_POST['year']) ."',
dep1='". mysqli_real_escape_string($dbConnectionW, $_POST['dep1']) ."',
dep2='". mysqli_real_escape_string($dbConnectionW, $_POST['dep2']) ."',
f_pos='". mysqli_real_escape_string($dbConnectionW, $_POST['f_pos']) ."',
f_region='". mysqli_real_escape_string($dbConnectionW, $_POST['f_region']) ."',
exp_comp='".$comp."',
exp_dep='".$comp_dep."',
shareinfo='".$shareinfo."',
interest='".$interest."',
usercOnfirm= '1'
WHERE cOnfirmcode= '".$passkey."';");
$stmt->execute();
if (!$stmt)
{
die('Error: ' . mysqli_error($dbConnectionW));
}
$smst-> close(); }}} mysqli_close($dbConnectionW);
}
Basically the issue is that it won't update the database! It works with no errors, but the database does not get updated after this sql/php attempt.
基本上问题是它不会更新数据库!它没有错误,但是在这个sql/php尝试之后,数据库不会被更新。
Can anyone see anything wrong with my code? What are some possible causes for why my would my database not be updated? I've been starting at this for the past hour.
有人能看出我的代码有什么问题吗?为什么我的数据库不能更新?在过去的一个小时里,我一直在做这件事。
1 个解决方案