[英]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.