Jump to content

[SOLVED] Parse Error --> syntax error, unexpected T_LNUMBER, expecting ',' or ';'


godly.asian

Recommended Posts

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.

 

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

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 <?

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]

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

Archived

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

×
×
  • 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.