two names come to POSTe, they are assigned to $newName and $oldName . Why does the query to the database never arrive?
$query = "UPDATE `img_table` SET `name` = $newName WHERE `name` = $oldName"; $updName = mysql_query($query); two names come to POSTe, they are assigned to $newName and $oldName . Why does the query to the database never arrive?
$query = "UPDATE `img_table` SET `name` = $newName WHERE `name` = $oldName"; $updName = mysql_query($query); Everything is almost right with you ... if you used PDO and constructed the request, there would be no error, and since you write directly, consider the type of parameters passed: the string is passed in quotes ...
$query ="UPDATE `img_table` SET `name` = '$newName' WHERE `name` = '$oldName'"; $updName = mysql_query($query); Source: https://ru.stackoverflow.com/questions/537253/
All Articles