View Single Post
Old 15-12-2007, 08:42   #30 (permalink)
mgpwr
with a hint of lemon
 
mgpwr's Avatar
 
Join Date: Aug 2006
Location: Sheffield
Posts: 518
Quote:
Originally Posted by haku
Sorry, I just realized I referenced a script that I didn't include in my post. Try this:

Code:
<?php function curPageName() { return substr($_SERVER["SCRIPT_NAME"],strrpos($_SERVER["SCRIPT_NAME"],"/")+1); } if(!isset($_COOKIE['offset'])) { ?> <script type="text/javascript"> { var now = new Date(); var client_offset = now.getTimezoneOffset() * 60; document.cookie = 'offset=' + client_offset; window.location=("<?php echo curPageName(); ?>"); } </script> <?php } ?>


I have added this just above the script i am using to say the quotes depending on the time, how will i know if it is working, i have changed the time zone on my laptop and it still stays with the same message.. so err how would i test it is working?
__________________
Online portfolio: mgpwr.co.uk
  Reply With Quote