$connection = mysql_connect($host, $user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); $sql = "UPDATE ad SET adName='$adName', adInfo='$adInfo', adPrice='$adPrice' WHERE adID='21'"; $result = mysql_query($sql) or die("Couldn't modify database."); mysql_close($connection);
This is the error I get: Couldn't modify database. Anyone knows what is happening and why I cannot update the database?
I checked all tables in the database for spelling mistakes and the variables. But I found no mistakes.