Ryuujin Posted September 3, 2007 Share Posted September 3, 2007 if ($page == "Edit_Tv-Show_2") { if ($_SESSION[username] == "Ryuujin") { $id = mysql_real_escape_string($_GET[id]); $image = mysql_real_escape_string($_POST[image]); $name = mysql_real_escape_string($_POST[name]); $release = mysql_real_escape_string($_POST[release]); $genre = mysql_real_escape_string($_POST[genre]); $description = mysql_real_escape_string($_POST[description]); mysql_query("UPDATE CatTvShows SET image = '$image', name = '$name', release = '$release', genre = '$genre', description = '$description' WHERE id = '$id'"); echo "<hr /><center>Done, <a href='index.php?page=Tv-Shows'>Continue</a></center>"; } else { echo "You do not have permission to view this section of the website, you thought you could try screwing with the website huh? Well, to bad, I'm not that stupid."; } } So, I run this and nothing is updated, whats wrong? It looks fine to me.... Link to comment https://forums.phpfreaks.com/topic/67767-updating-problem/ Share on other sites More sharing options...
Guardian-Mage Posted September 3, 2007 Share Posted September 3, 2007 change mysql_query("UPDATE CatTvShows SET image = '$image', name = '$name', release = '$release', genre = '$genre', description = '$description' WHERE id = '$id'"); to mysql_query("UPDATE CatTvShows SET image = '$image', name = '$name', release = '$release', genre = '$genre', description = '$description' WHERE id = '$id'") or die("Unable to execute your query, the problem was:" . mysql_error()); Than tell us if it returns an error Link to comment https://forums.phpfreaks.com/topic/67767-updating-problem/#findComment-340433 Share on other sites More sharing options...
Ryuujin Posted September 3, 2007 Author Share Posted September 3, 2007 Here is the error I got: Unable to execute your query, the problem was:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'release = '0', genre = 'Drama / Mystery / Sci-Fi', description = 'A family takes' at line 1 Link to comment https://forums.phpfreaks.com/topic/67767-updating-problem/#findComment-340462 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.