I'm trying to update data in my database but I have run into this error and can't figure it out. Here is the full error.
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 'forum = 'A Place To Chat!!! aaabbb' blog = 'A Place To Read!!!' tut = 'A Place T' at line 2
I posted the query and it came out correctly. (I added aaabbb to test if it was working)
UPDATE editmpage SET leftnav = 'Your left menu will go here. You can place images, text links, etc. in this div. To change the properties of this div you can change the #left selector in the style sheet that is located on this page between the head tags.' forum = 'A Place To Chat!!! aaabbb' blog = 'A Place To Read!!!' tut = 'A Place To Learn!!!' youtube = 'A Place To Style Out Your Youtube Channel!!!' WHERE id = '1'
And here is my PHP code for that little bit.
$leftnav = $_POST['leftnav'];
$forum = $_POST['forum'];
$blog = $_POST['blog'];
$tut = $_POST['tut'];
$youtube = $_POST['youtube'];
$query = "UPDATE editmpage
SET leftnav = '$leftnav' forum = '$forum' blog = '$blog' tut = '$tut' youtube = '$youtube'
WHERE id = '1'";