MYSQL HELP!

ok I am pretty new to PHP/MYSQL and am just trying to get the basics down below is a code to a simple register program that will teach me but everytime I run it through the server software it comes up with this error Parse error: syntax error, unexpected T_STRING in C:wampwwwahandler2.php on line 25 which just happens to be the the line where it says VALUES can some one tell me what I am doing wrong?

Here is the code

<?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); ?> <?php INSERT (user,pass) VALUE ('$user','$pass') or Die(mysql_error()); Echo("You have been registered"); ?>

Thanks Zeth

How about:

mysql_query("INSERT (user,pass) VALUES ('$user','$pass')") or die (mysql_error());

Don’t just put literals in PHP code without quotes, that gives errors.

Sponsor our Newsletter | Privacy Policy | Terms of Service