css - PHP text-size selector within a Drupal site only working when logged in -


i have php text-size select function within drupal site:

it uses selector...:

<ul id="font-sizes">         <li class="one"><a href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/resize.php?set=small">normal font-size</a></li>         <li class="two"><a href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/resize.php?set=medium">medium font-size</a></li>         <li class="three"><a href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/resize.php?set=large">large font-size</a></li> </ul> 

...which modifies stylesheet link...:

<link rel="stylesheet" type="text/css" media="screen"  href="<?php global $base_url; print $base_url;?>/sites/all/themes/x/<?php echo isset($_cookie['sitestyle'])?$_cookie['sitestyle']:'small'; ?>.css" /> 

... using file (resize.php):

<?php setcookie ('sitestyle', $_get['set'], time()+31536000,'/', 'mysite.co.uk', '0'); header("location: ".$_server['http_referer']); ?> 

now, problem works fine when logged cms (as main admin or lower level role), but not work when accessing site anonymous user. i've been through permissions settings, can't life of me see affect this. i'm guessing therefore it's higher-level php access thing beyond me.

any ideas?

drupal set cache pages anonymous users. if cookie set page returned same.

if server can handle load disable caching in admin performance page , should work.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -