dkoolgeek Posted January 12, 2007 Share Posted January 12, 2007 Hey,I keep getting the following error:Parse error: parse error, unexpected $end in C:\wamp\www\eBiz 07\Header.php on line 31With this script:[code]<? session_start(); ?><style type="text/css"> a:link { color:#0099FF} a:visited{ color:#CC99FF} font{ color:#FFFFFF} p{ color:#FFFFFF}</style> <font color = "White"></font><table width="884" height="185" border="0" align = "center"> <tr align = "center"> <td width="445" height="74" rowspan="2"><img src="Logo.jpg" width="406" height="104"></td> <td height="122" colspan="3"> <?php if(isset($_SESSION['in'])) {if($_SESSION['in'] == 1){ include("Logoutlink.php");} else{ include("Login.php");} ?> </td> </tr> <tr bordercolor = "white"> <td width="57" height="21"><div align="center"><a href="index.php">Home</a></div></td> <td width="68"><div align="center"><a href="about.php">About</a></div></td> <td width="98"><div align="center"><a href="MyAccount.php">My Account</a></div></td> </tr></table>[/code]Any help in solving this would be greatly appreciated. Quote Link to comment https://forums.phpfreaks.com/topic/33911-trouble-with-a-script/ Share on other sites More sharing options...
metrostars Posted January 12, 2007 Share Posted January 12, 2007 It might be within Logoutlink.php or Login.php where there are not enough }'s or ;'sJust count the number of openers and closer and they should be the same. Quote Link to comment https://forums.phpfreaks.com/topic/33911-trouble-with-a-script/#findComment-159197 Share on other sites More sharing options...
redbullmarky Posted January 12, 2007 Share Posted January 12, 2007 you need an extra bracket here:[code] else { include("Login.php"); } } <------ here[/code] Quote Link to comment https://forums.phpfreaks.com/topic/33911-trouble-with-a-script/#findComment-159198 Share on other sites More sharing options...
bigrossco Posted January 12, 2007 Share Posted January 12, 2007 When i do programing a good way i find to ensure I have all the { } I need is to place each one on a new line and indent any text after that ;) that way if I miss any out I can find it easaly Quote Link to comment https://forums.phpfreaks.com/topic/33911-trouble-with-a-script/#findComment-159202 Share on other sites More sharing options...
taith Posted January 12, 2007 Share Posted January 12, 2007 [code]<? session_start(); ?><style type="text/css"> a:link { color:#0099FF} a:visited{ color:#CC99FF} font{ color:#FFFFFF} p{ color:#FFFFFF}</style> <font color = "White"></font><table width="884" height="185" border="0" align = "center"> <tr align = "center"> <td width="445" height="74" rowspan="2"><img src="Logo.jpg" width="406" height="104"></td> <td height="122" colspan="3"><?phpif(isset($_SESSION['in'])){ if($_SESSION['in'] == 1) include("Logoutlink.php"); else include("Login.php");} ?> </td> </tr> <tr bordercolor = "white"> <td width="57" height="21"><div align="center"><a href="index.php">Home</a></div></td> <td width="68"><div align="center"><a href="about.php">About</a></div></td> <td width="98"><div align="center"><a href="MyAccount.php">My Account</a></div></td> </tr></table>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/33911-trouble-with-a-script/#findComment-159204 Share on other sites More sharing options...
dkoolgeek Posted January 12, 2007 Author Share Posted January 12, 2007 Thanks its working now. Quote Link to comment https://forums.phpfreaks.com/topic/33911-trouble-with-a-script/#findComment-159213 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.