-
activate and deactivate
Do you know of any coding that would activate and deactivate a link on
a web page based on time of day?
-
-
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.
Daniel -
Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks