470,575 Members | 1,831 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,575 developers. It's quick & easy.

Parse error: parse error, unexpected $ in...

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:
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!"
print $err;
the My_SQL_Server, My_DB, and My_Password are all replaced with the proper values.
Jul 16 '07 #1
3 1122
Never Mind, I fixed it by changing line 12:
and line 17:
echo "Error!"
echo "Error!";
Jul 16 '07 #2
1,584 Expert 1GB
Thanks for sharing the solution with the others.
best of luck!
Jul 16 '07 #3
5,821 Expert 4TB
Heya nazgul.

Glad to hear you got it working! Good luck with your project, and if you ever need anything, post back anytime :)

Thanks for posting the solution, too.
Jul 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Marten van Urk | last post: by
6 posts views Thread by Ehartwig | last post: by
1 post views Thread by livre | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.