How to Place a “Last Updated” Script on your Landing Page

If you are running traffic to any sort of landing page, you can help keep it looking fresh to your visitors by placing a script on the page that will keep the “last updated” date looking recent.

In the top right-hand corner or somewhere, you can plug something in to say “Last Updated On: August 20th, 2011”. Every time a visitor hits your page, it will automatically change and display the previous day in the “Last Updated On”. Your visitor is going to see this and see that you keep your site up to date, and they can really satisfy what they’re looking for. Here’s how to add this. Insert this at the very very top of your index file :

<!–?php $yesterday = date(‘m/d/Y’, mktime(0, 0, 0, date(“m”) , date(“d”) – 1, date(“Y”))); ?–>
and then where you want the text in your page, paste this :
Last Updated On : <!–?php echo $yesterday ?–>