[英]Php mysql update puts in blank space
好吧,所以我在这里有问题。 我解决了仅通过设置值更新到mysql数据库的问题。 但是现在我想让用户通过使用文本框来添加内容以更新行。 这似乎不起作用
码:
$newfirstname = $_POST['newfirstname'];
//Update the record
$updateQuery = "UPDATE users SET firstname = '".$newfirstname."' WHERE KcID = 2";
mysql_query($updateQuery) or die("Error: ".mysql_error());
//create the query
$query = mysql_query("select * from voskousers");
//return the array and loop through each row
while ($row = mysql_fetch_array($query))
{
?>
它只是不使用正确的值来更新它,因此在我的行中使其成为空白。
是因为您要更新一个名为users的表,然后从一个名为voskousers的表中进行选择吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.