jmillspaysbills Posted July 30, 2009 Share Posted July 30, 2009 Hi Guys and Gals. Let me first say how much I appreciate your help with past problems from searching this board. I've been lurking about, but have never had a problem I couldn't find the answer to online. This one may be pretty simple or it may be just completely impossible. I have no idea. I found a style switcher php script, that is super easy. It uses cookes (i know, i know) you can view the page here: http://64.39.65.107/home.php We're using this style swicher to switch between styles so the users can find clues, once they do they'll get a coupon for a free drink. (click the different buttons on the iphone) In ie8, you can select one style initially, but it will not select a different style unless you clear your cookies. Anyway, the script works great in ie6/7, firefox, safari, mac/pc, but NOT ie8. I'm completely dumbfounded. I've asked some people that know about PHP and they say the script looks accurate. below is the code for the switcher.php <?php /* expire in 1 year */ setcookie("sitestyle", $_GET['set'], time()+31536000); header("Location: /home.php"); echo $_SERVER[HTTP_REFERER] ?> below is the code on each page that will determine the style selected <!-- sticky; will not change --> <link href="/css/main.css" rel="stylesheet" type="text/css" /> <link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="/css/<?php echo (!$_COOKIE["sitestyle"])?'default':$_COOKIE["sitestyle"] ?>.css" /> <!-- alternative; optional --> <link rel="alternate stylesheet" type="text/css" media="screen" title="knockoutPunch" href="/css/knockoutPunch.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="bayBreeze" href="/css/bayBreeze.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="painKiller" href="/css/painKiller.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="whiteRussian" href="/css/whiteRussian.css" /> <link rel="alternate stylesheet" type="text/css" media="screen" title="margarita" href="/css/margarita.css" /> Like I said, I have absolutely no idea what could be causing this to not work in ie8. Do you know of any bugs? Is it something I can't fix? Thanks in advance for all your help. I really appreciate ANY input you can give me, however insignificant. Quote Link to comment 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.