destrugter
07-21-2007, 08:01 AM
ok, i was doing good until now, when people register they register with a username, pass, email, and their runescape name....i am registering myself and displaying all of the above but something went wrong with my insert.php file i get this error now,
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 '')' at line 5
can anyone tell me what i did wrong....just in case here is my code the values anyway
<?php
$con = mysql_connect("mysql","cheese","pizza");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("cheese", $con);$sql="INSERT INTO UserInfo (username, pass, email, rsname)
VALUES
('$_POST[username]','$_POST[pass]','$_POST[email]','$_Post[rsname])";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "<p>Thank you <b>".$_POST['username']."</b>, your information has been added to the database, "
."you may now <a href=\"/\">log in</a>.</p>";
mysql_close($con)
?>
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 '')' at line 5
can anyone tell me what i did wrong....just in case here is my code the values anyway
<?php
$con = mysql_connect("mysql","cheese","pizza");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}mysql_select_db("cheese", $con);$sql="INSERT INTO UserInfo (username, pass, email, rsname)
VALUES
('$_POST[username]','$_POST[pass]','$_POST[email]','$_Post[rsname])";
if (!mysql_query($sql,$con))
{
die('Error: ' . mysql_error());
}
echo "<p>Thank you <b>".$_POST['username']."</b>, your information has been added to the database, "
."you may now <a href=\"/\">log in</a>.</p>";
mysql_close($con)
?>