View Full Version : activate and deactivate
Jerome
07-16-2006, 01:34 PM
Do you know of any coding that would activate and deactivate a link on
a web page based on time of day?
djr33
07-28-2006, 05:28 PM
You'd need to use php if you wanted it secure/compatible, but you could try javascript as well.
It's not that complex.
Basically an if.
In php, something like
<?php
...
if ($time > 1300) { echo '<a href="blah">blah</a>';}
?>
Note that $time must be set to the time of day in military time for the above example to work. There's info on that kind of thing at php.net-- look at both time() and date() functions.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.