Jump to content


Photo

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


  • Please log in to reply
5 replies to this topic

#1 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 10 March 2006 - 11:35 PM

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!
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#2 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 11 March 2006 - 12:09 AM

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]
Legend has it that reading the manual never killed anyone.
My site

#3 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 11 March 2006 - 12:10 AM

ohhh, i dont read manuals :P
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#4 AndyB

AndyB
  • Staff Alumni
  • Advanced Member
  • 5,465 posts
  • LocationToronto

Posted 11 March 2006 - 12:12 AM

[!--quoteo(post=353770:date=Mar 10 2006, 07:10 PM:name=joecooper)--][div class=\'quotetop\']QUOTE(joecooper @ Mar 10 2006, 07:10 PM) View Post[/div][div class=\'quotemain\'][!--quotec--]
ohhh, i dont read manuals :P[/quote]
There's probably a moral in this story somewhere :)
Legend has it that reading the manual never killed anyone.
My site

#5 joecooper

joecooper
  • Members
  • PipPipPip
  • Advanced Member
  • 358 posts

Posted 11 March 2006 - 12:15 AM

yeah! dont read manuals, get someone else to do it!
Signature:
[/a]
[a href="http://www.planet-so...=1999&lngWId=8" target="_blank"]EzLogin 1.0[/a]
[a href="http://www.essexracers.com" target="_blank"]Essexracers.com[/a]
Msn Messenger: joe@joeyjoe.co.uk

#6 txmedic03

txmedic03
  • Members
  • PipPipPip
  • Advanced Member
  • 313 posts
  • LocationCall, TX, USA

Posted 11 March 2006 - 01:47 AM

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. ;-)

SEMPER FIDELIS!

I can't stop you from doing something silly, but at least I can help you do it right.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users