Jump to content

Mysql INSERT query


chand.sethi77

Recommended Posts

Tell me the correct syntax for INSERT INTO updatesMy code is as follows:

 <?php$name = $_POST['name'];$email = $_POST['email'];$subject = $_POST['subject'];$catagory = $_POST['catagory'];$content = $_POST['content'];?><?php$insert = mysql_query("INSERT INTO updates (name, email, subject, catagory, content)						VALUES($name, $email, $subject, $catagory, $content)	");if (!$insert) { die ("Error in inserting your query. " . mysql_error()); }?>

The error is Error in inserting your 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 '@gmail.com, Something, arts, Does it happen? on line 2. Please copy the code, do the desirable changes and post it back . THANKSCHAAND SETHI

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...