joecooper Posted March 10, 2006 Share Posted March 10, 2006 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 21with: //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 https://forums.phpfreaks.com/topic/4649-parse-error-parse-error-unexpected-t_lnumber-expecting-t_variable-or-in-homeessexracpublic_htmljoeprojectxregisterphp-on-line-21/ Share on other sites More sharing options...
AndyB Posted March 11, 2006 Share Posted March 11, 2006 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 https://forums.phpfreaks.com/topic/4649-parse-error-parse-error-unexpected-t_lnumber-expecting-t_variable-or-in-homeessexracpublic_htmljoeprojectxregisterphp-on-line-21/#findComment-16269 Share on other sites More sharing options...
joecooper Posted March 11, 2006 Author Share Posted March 11, 2006 ohhh, i dont read manuals :P Link to comment https://forums.phpfreaks.com/topic/4649-parse-error-parse-error-unexpected-t_lnumber-expecting-t_variable-or-in-homeessexracpublic_htmljoeprojectxregisterphp-on-line-21/#findComment-16270 Share on other sites More sharing options...
AndyB Posted March 11, 2006 Share Posted March 11, 2006 [!--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 https://forums.phpfreaks.com/topic/4649-parse-error-parse-error-unexpected-t_lnumber-expecting-t_variable-or-in-homeessexracpublic_htmljoeprojectxregisterphp-on-line-21/#findComment-16271 Share on other sites More sharing options...
joecooper Posted March 11, 2006 Author Share Posted March 11, 2006 yeah! dont read manuals, get someone else to do it! Link to comment https://forums.phpfreaks.com/topic/4649-parse-error-parse-error-unexpected-t_lnumber-expecting-t_variable-or-in-homeessexracpublic_htmljoeprojectxregisterphp-on-line-21/#findComment-16274 Share on other sites More sharing options...
txmedic03 Posted March 11, 2006 Share Posted March 11, 2006 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 https://forums.phpfreaks.com/topic/4649-parse-error-parse-error-unexpected-t_lnumber-expecting-t_variable-or-in-homeessexracpublic_htmljoeprojectxregisterphp-on-line-21/#findComment-16302 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.