mysql help

I asked a question before and ran the script the problem went away this one came instead

BTW this is the mysql version
5.0.45

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 ‘(user,pass) VALUES (’’,’’)’ at line 1

Here is the code that is making the problem:

<?php $User = $_GET['user']; $Pass = $_GET['pass']; ?> <?php $dbhost = 'localhost'; $dbuser = 'root'; $dbpass = ''; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql'); $dbname = 'site'; mysql_select_db($dbname); mysql_query("INSERT (user,pass) VALUES ('$user','$pass')") or die (mysql_error()); Echo("You have been registered"); ?>

Which table are you inserting the values in? ;)

it is a test db called site

Yes, but where in the query are you defining that?

Thanks I fixed that I was wondering why it was coming up with errors

Sponsor our Newsletter | Privacy Policy | Terms of Service