Forum Moderators: coopster

Message Too Old, No Replies

ie displays php different than mozilla

         

tunnelduck

3:50 am on Jan 26, 2004 (gmt 0)

10+ Year Member



I have a wierd thing where for some reason internet explorer processes the php differently than mozilla, something i find interesting since i thought that php was run on the server side and the only the result outputted to the browser. I have on my page a top flash banner that i only want it to show its animation every couple of pages rather than every time a user clicks on a link so i threw this code together (probably considered sloppy, i know there is even some redundance that isnt needed but this is the result of rewriting it several possible ways to try to make it work correctly):

if($_SESSION['flashthingy'] < '1') {
$_SESSION['flashthingy'] = '1';
}
if($_SESSION['flashthingy'] > '0') {
$_SESSION['flashthingy'] += '1';

if($_SESSION['flashthingy'] == '4') {
$_SESSION['flashthingy'] = '0';
}
}

later...

if($_SESSION['flashthingy'] < '1') {
display animated version
} else { display non-animated }

Now with ie it works fine, but with mozilla it only shows the animated version. im guessing it has to do with how it stores session variables, only thing that makes since to me. but if so how can it be changed. you can see what i mean by going to xomar.com and checking out the top banner.

coopster

1:14 pm on Jan 26, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You're right, tunnelduck, PHP is server-side, as is the code you posted. Whatever is sent to the browser should render the same. What won't allow it to render the same in the browser? I can think of a couple things to check...
  • The browser is caching the page
  • Browser interprets stylesheet markup differently

I'm sure others can help by adding to this list...

daisho

2:31 pm on Jan 26, 2004 (gmt 0)

10+ Year Member



I would agree with coopster that it has to do with caching. You may want to throw some cache breaking headers out to the browser for force it to refect data. But really why do you need to? Your code works fine and in face with mozilla I think it works better since if you've send me the flash banner why switch it back? I've already downloaded it.

daisho.