Jump to content

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


joecooper

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!
Link to comment
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]
Link to comment
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 :)
Link to comment
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. ;-)
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.