Click to See Complete Forum and Search --> : [RESOLVED] why does this script not forward users to alt page in IE5?


postedoverseas
09-14-2006, 02:32 PM
Hi,

I have a script in the head of my index page that checks if the user is using IE5 and if they are it uses a different CSS stylesheet.
The script is as follows
<?php
$list=$_SERVER['HTTP_USER_AGENT'];
$explode=explode(';', $list);
$vs=$explode['1'];
$query_MSIE="SELECT IF (SUBSTRING('$vs',7,1)=5, '<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/MSIE5.css\" />', '<link rel=\"stylesheet\" type=\"text/css\" href=\"../css/layout.css\" />') AS header;";
$MSIE=mysql_query($query_MSIE, $campaign) or die (mysql_error());
$row_MSIE=mysql_fetch_assoc($MSIE);
echo $row_MSIE['header'];
?>
I have a BBClone counter that records all the pages visited.

I have a link from my other website that regsiters the BBClone page title 'Forwarded to The BFPO Campaign' and uses a php header("Location.... to forward them to the new page.

With every other browser I see the usual info on my primary site and then when 'Forwarded to The BFPO Campaign' comes up I see the information on the other site and then they browse the second site as normal.

But with IE5, on my primary counter page I get the 'Forwarded to The BFPO Campaign' as usual but they appear not to be able to access the site as I see no info for them with the campaign counter.

I hope all this makes sense, and if not please ask questions.

I have tested IE5 with browserCam and it works fine for me.

I am also having a CSS problem with IE5 if anybody cares to look.
http://www.webdevelopers.com/forum/showthread.php?t=120989