I am writing a very simple login script for a website that I am also writing, but when I try to run it, the only error I get is:
Parse error: parse error, unexpected $ in /home/www/zammarket.freehostia.com/signup.php on line 22
Line 22 is the last line in the file.
My code is here:
[PHP]
<?php
echo "Starting...";
@mysql_connect(My_Sql_Server, My_DB, My_Password) or die("Cannot Connect To DB!");
@mysql_select_db(My_DB) or die("Cannot Select DB!");
echo "Connected!";
$sql = "INSERT INTO users (username, password, rsusername) VALUES('" .
$_POST['Username'] .
"','" .
$_POST['Password'] .
"','" .
$_POST['RSUsername'] .
');";
echo "SQL Statement Written";
$r = mysql_query($sql);
echo "Query Performed";
if(!$r) {
echo "Error!"
$err=mysql_error();
print $err;
exit();
}
?>
[/PHP]
the My_SQL_Server, My_DB, and My_Password are all replaced with the proper values.