Jump to content

Archived

This topic is now archived and is closed to further replies.

joecooper

Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/essexrac/public_html/joe/projectx/register.php on line 21

Recommended Posts

getting this error:
Parse error: parse error, unexpected T_LNUMBER, expecting T_VARIABLE or '$' in /home/essexrac/public_html/joe/projectx/register.php on line 21

with:

//check to see if the username or email allready excists
$sql="SELECT * FROM users WHERE email='$email'"; //get rows where the username or email address is allready registered
$2sql="SELECT * FROM users WHERE username='$username'"; //get rows where the username or email address is allready registered
$result=mysql_query($sql);
$2result=mysql_query($2sql);

line 21 is:
$2sql="SELECT * FROM users WHERE username='$username'"; //get rows where the username or email

thanks!

Share this post


Link to post
Share on other sites
Direct from the manual:
[!--quoteo--][div class=\'quotetop\']QUOTE[/div][div class=\'quotemain\'][!--quotec--] Variable names follow the same rules as other labels in PHP. A valid variable name starts with a letter or underscore[/quote]

Share this post


Link to post
Share on other sites
[!--quoteo(post=353770:date=Mar 10 2006, 07:10 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Mar 10 2006, 07:10 PM) [snapback]353770[/snapback][/div][div class=\'quotemain\'][!--quotec--]
ohhh, i dont read manuals :P[/quote]
There's probably a moral in this story somewhere :)

Share this post


Link to post
Share on other sites
Never read the manual and you write erroneous code or at the very least spend lots of time writing superfluous code. Lots of headaches and time spent searching for someone to answer a question you could have already known the answer to very easily. Incidently, your mysql requests could be simpler. ;-)

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.