When i try to execute the code below it shows the error:
Invalid query: 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 '','','','')' at line 1
$result = mysql_query("REPLACE INTO templates (id,title,subtitle,background,image,image2,image3,image4,image5,image6,createdby) VALUES ('$id','$title','$subtitle','$background','$image','$image2','$image3','$image4,'$image5','$image6','$fbuid')");
if (!$result) {
die('Invalid query: ' . mysql_error());
}
But the code below works totally fine:
mysql_query("REPLACE INTO Users (fbuid,username,email,token) VALUES ('$fbuid', '$name', '$email', '$token')");
What can be the issue?