Jump to content

If date equils X then radio button disabled?


MyMammothTech

Recommended Posts

It would depend on how you are comparing the dates. The best way is unix timestamps.

 

You would give the date its date value as a timestamp.

 

Then have a variable 

$week = 60 * 60 *24 * 7; //seconds in a week

$maxtime = $_SERVER['REQUEST_TIME'] + $week;

$mintime = $_SERVER['REQUEST_TIME'] - $week;

 

then if($timestamp > $maxtime && $timestamp < $mintime)  // allow radio button.

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.