
Solid, safe website tools.
Whatever your need, Will Bontrager builds powerful software solutions.
|
|
Automatic Copyright Year UpdatingSoon, the new year will be here. And there will be a scramble to update the copyright year printed on web pages. Shortly, you may be updating your web pages' copyright line for the last time. No more yearly chore. This article provides both JavaScript and PHP methods of automatically updating the year in your copyright lines. Here is the code for the JavaScript method. There is one place to customize, where you specify the copyright line to print. Use the placeholder [[YEAR]] where the current year is to be inserted. If you decide to use the JavaScript method, it may be prudent to put a generic copyright line between NOSCRIPT tags, something that will print on the page when displayed with JavaScript-disabled browsers. And here is the code for the PHP method. As with the JavaScript, there is one place to customize, where you specify the copyright line to print. Use the placeholder [[YEAR]] where the current year is to be inserted. With either method, paste the code into your web pages where the copyright line shall be printed. Then, you're good to go year after year after year.
Will Bontrager
Please note: Articles on this website are presented "as is". However - If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript |
|
© 1998-2001 William and Mari Bontrager |
|