Jump to content

IF/THEN Statement (with time)


mcmuney

Recommended Posts

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.