April 27, 2012
Parse error: syntax error, unexpected T_VARIABLE in /home/rixo/public_html/login/process.php on line 41
Question by Jack-T
I am new to php. I keep having this error – Parse error: syntax error, unexpected T_VARIABLE in /home/rixo/public_html/login/process.php on line 41
Here is the full code – http://pastebin.com/8Yqmk0MX
If you could look through it for me and see what is the problem it would be a great help.
-Thank you in advance
Answer by Starx
Its due to unclosed quote on this line
$checkuser = mysql_query('SELECT username FROM user WHERE username='$user');
Fix it
$checkuser = mysql_query("SELECT username FROM user WHERE username='$user'");
Update:
Found another query error on line 61 of the paste. There is mismatching quotes
$write = “INSERT INTO user (username, password, email) VALUES ('$user', '$pwd', '$mail’)';
Fix them
$write = "INSERT INTO user (username, password, email) VALUES ('$user', '$pwd', '$mail')";