Parse error: syntax error, unexpected T_ELSE

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
bryaninfuze
Forum Newbie
Posts: 3
Joined: Fri Sep 26, 2008 10:50 am

Parse error: syntax error, unexpected T_ELSE

Post by bryaninfuze »

Parse error: syntax error, unexpected T_ELSE in /home/infuze/public_html/templates/jw_inetgazette/index.php on line 55

I want to make a simple if statement say if your on the index page show a .swf file and if your not show the header image but I keep getting the error above...

here is the code.. any help will be much appreciated...

<script type="text/javascript" src="swfobject.js"></script>
<div id="flashcontent">
<img src="images/header.png" />
</div>

<script type="text/javascript">
var so = new SWFObject("banner2.swf", "index", "929", "96", "8", "#000");
so.write("flashcontent");
</script>;


<? if (url == index.php);

echo "<script language='javascript'>startdisplay();</script>";


else (url == NULL);
echo "<img src=/image/header.png>";


?>
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Re: Parse error: syntax error, unexpected T_ELSE

Post by thiscatis »

if(condition) { //do something;}
else { //do something else; }
bryaninfuze
Forum Newbie
Posts: 3
Joined: Fri Sep 26, 2008 10:50 am

Re: Parse error: syntax error, unexpected T_ELSE

Post by bryaninfuze »

sorry im kind of a newbie can you explain so that i can understand?

right now im saying

if the url is index.php then execute this...

else the url is something other than index.php do something else...

i want it to show an image on every page but the index.php... and on the index.php page i want to show a .swf
bryaninfuze
Forum Newbie
Posts: 3
Joined: Fri Sep 26, 2008 10:50 am

Re: Parse error: syntax error, unexpected T_ELSE

Post by bryaninfuze »

never mind. thanks... its not throwing the error but I still can't see the .swf...any ideas? I think i might be calling my JavaScript wrong..

any help would be appreciated! Thanks guys!
Post Reply