Jump to content

Recommended Posts

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

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.