GregT
November 7th, 2002, 18:18
this is my first big thing in sql, i usaully do stuff flat file but sql works better here.
function adminreg() {
if(!($link_id = mysql_connect("mysqlserver", "yupadog", "pass"))) die(mysql_erorr());
mysql_select_db(yupadog);
$sql = "INSERT INTO " . $Table . " VALUES('', '" . addslashes($_POST['Name']) . "', '" . md5($_POST['Password']) . "')";
if(!($result = mysql_query($sql))) {
die(mysql_error());
} else {
echo "Your user account has been created!<br>";
echo "<a href=index.php>Continues</a> to the login page";
}
}
What wrong with my sql ? I get "You have an error in your SQL syntax near 'VALUES('', 'raz0r', '5f4dcc3b5aa765d61d8327deb882cf99')' at line 1"
plz help :(
function adminreg() {
if(!($link_id = mysql_connect("mysqlserver", "yupadog", "pass"))) die(mysql_erorr());
mysql_select_db(yupadog);
$sql = "INSERT INTO " . $Table . " VALUES('', '" . addslashes($_POST['Name']) . "', '" . md5($_POST['Password']) . "')";
if(!($result = mysql_query($sql))) {
die(mysql_error());
} else {
echo "Your user account has been created!<br>";
echo "<a href=index.php>Continues</a> to the login page";
}
}
What wrong with my sql ? I get "You have an error in your SQL syntax near 'VALUES('', 'raz0r', '5f4dcc3b5aa765d61d8327deb882cf99')' at line 1"
plz help :(