Jump to content

Mysql INSERT query


chand.sethi77
 Share

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...