godly.asian Posted March 10, 2007 Share Posted March 10, 2007 Full Error: Parse error: syntax error, unexpected T_LNUMBER, expecting ',' or ';' in /home/chyoyo/domains/chineseyoyo.canoop.com/public_html/login.html on line 182 Code: http://chineseyoyo.canoop.com/login.php http://chineseyoyo.canoop.com/login.html ^It is in .php since otherwise if it was in .html you wouldn't get the code.^ ^In respective order: PHP Code / PARSE ERROR Can anyone help me, I don't understand the problem. It is a html line. Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/ Share on other sites More sharing options...
per1os Posted March 10, 2007 Share Posted March 10, 2007 We need more code than just that buddy, give us like at least 10 lines in both directions from that spot. --FrosT Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204467 Share on other sites More sharing options...
godly.asian Posted March 10, 2007 Author Share Posted March 10, 2007 sry. I thought the .php file worked: 170 <div style=\"clear: both\"></div> 171 </div></div> 172 <!-- /wrapper --><!-- /footer --> 173 </div> 174 </div> 175 <!-- /wrapper --><!-- /container --> 176 177 <div id=\"extraDiv1\"><span></span></div><div id=\"extraDiv2\"><span></span></div> 178 <div id=\"extraDiv3\"><span></span></div><div id=\"extraDiv4\"><span></span></div> 179 <div id=\"extraDiv5\"><span></span></div><div id=\"extraDiv6\"><span></span></div>]\"; 180 } 181 else{ 182 <h2><font size="4">Login</font></h2> 183 <? 184 /** 185 * User not logged in, display the login form. 186 * If user has already tried to login, but errors were 187 * found, display the total number of errors. 188 * If errors occurred, they will be displayed. 189 */ 190 if($form->num_errors > 0){ 192 echo "<font size="2" color="#ff0000">".$form->num_errors." error(s) found</font>"; 193 } 194 ?> Tell me if you anymore Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204470 Share on other sites More sharing options...
godly.asian Posted March 10, 2007 Author Share Posted March 10, 2007 can anyone help? I am on tight time. Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204512 Share on other sites More sharing options...
marcus Posted March 10, 2007 Share Posted March 10, 2007 Try ending the PHP or echoing it: else{ <h2><font size="4">Login</font></h2> <? TO else{ ?> <h2><font size="4">Login</font></h2> <? OR TO else{ echo "<h2><font size=\"4\">Login</font></h2>"; //delete the <? Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204514 Share on other sites More sharing options...
godly.asian Posted March 10, 2007 Author Share Posted March 10, 2007 well...what the script is really is a login system. I fixed the L_NUMBER, but then I get another error T_ELSE. Parse error: syntax error, unexpected T_ELSE in /home/chyoyo/domains/chineseyoyo.canoop.com/public_html/login.html on line 180 170 <div style=\"clear: both\"></div> 171 </div></div> 172 <!-- /wrapper --><!-- /footer --> 173 </div> 174 </div> 175 <!-- /wrapper --><!-- /container --> 176 177 <div id=\"extraDiv1\"><span></span></div><div id=\"extraDiv2\"><span></span></div> 178 <div id=\"extraDiv3\"><span></span></div><div id=\"extraDiv4\"><span></span></div> 189 <div id=\"extraDiv5\"><span></span></div><div id=\"extraDiv6\"><span></span></div>]"; 180 else{ 181 <h2><font size="4">Login</font></h2> 182 <? 183 /** 184 * User not logged in, display the login form. 185 * If user has already tried to login, but errors were 186 * found, display the total number of errors. 187 * If errors occurred, they will be displayed. 188 */ 189 if($form->num_errors > 0){ 190 echo "<font size="2" color="#ff0000">".$form->num_errors." error(s) found</font>"; I have attached the html file if you need the full source code. [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204531 Share on other sites More sharing options...
marcus Posted March 10, 2007 Share Posted March 10, 2007 } else{ ?> <h2><font size="4">Login</font></h2> <? /** try that. Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204533 Share on other sites More sharing options...
godly.asian Posted March 10, 2007 Author Share Posted March 10, 2007 I get a Parse error: syntax error, unexpected '}' in /home/chyoyo/domains/chineseyoyo.canoop.com/public_html/login.html on line 180 Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204542 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 help?! Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204573 Share on other sites More sharing options...
marcus Posted March 11, 2007 Share Posted March 11, 2007 Update us with the script. Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204575 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 sure np [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204576 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 updated Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204791 Share on other sites More sharing options...
interpim Posted March 11, 2007 Share Posted March 11, 2007 try changing the .html to .php you can't run php scripts in html pages Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204832 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 you sure? ??? cuz then wouldn't it be embeded in HTML. And plus I tried it out before on a watered down version, no graphics or divs in HTML format it it did work Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204841 Share on other sites More sharing options...
interpim Posted March 11, 2007 Share Posted March 11, 2007 html can be in same file as php... not the other way around... just remember to open/close your php before you start writing html or echo the html to the output. but php files need to be ran with a .php extension Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204850 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 I tried it out in php.. too it didn't work either http://chineseyoyo.canoop.com/login.php Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204855 Share on other sites More sharing options...
interpim Posted March 11, 2007 Share Posted March 11, 2007 on line 72, try getting rid of the '}' there... Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204867 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 did http://chineseyoyo.canoop.com/login.php Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204872 Share on other sites More sharing options...
interpim Posted March 11, 2007 Share Posted March 11, 2007 lol you need to close out the else statement on line 180 now... keep going, read the error outputs, then figure it out as you go. Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204874 Share on other sites More sharing options...
godly.asian Posted March 11, 2007 Author Share Posted March 11, 2007 I'll just make my own script Quote Link to comment https://forums.phpfreaks.com/topic/42148-solved-parse-error-syntax-error-unexpected-t_lnumber-expecting-or/#findComment-204881 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.