mcmuney Posted April 5, 2007 Share Posted April 5, 2007 I'm basically looking for an equavalent script of the php script below. The php works, but apparently it ONLY utilizes the server time and I need to utilize the time based on user location and I understand that can only be done with javascript: <?php $h = date('G'); if ($h <= 10 || $h >= 18) { //if $h is under or the same as 10 or $h is over or the same as 18 do... A(); }else { B(); } ?> Link to comment https://forums.phpfreaks.com/topic/45659-ifthen-statement-with-time/ Share on other sites More sharing options...
AndyB Posted April 5, 2007 Share Posted April 5, 2007 http://www.tizag.com/javascriptT/javascriptdate.php will get you started. Link to comment https://forums.phpfreaks.com/topic/45659-ifthen-statement-with-time/#findComment-221736 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.