As we enter November, Christmas is well and truly on its way. We can all look forward to dark nights, the switching on of lights and inevitable barrage of unwanted Christmas marketing creeping in with us in the festive spirit whether we choose to or not.

It's that time of year when those in the web design industry are often briefed with the task of updating our clients' websites with details of special offers and festive brand setting in the run up to one of the busiest periods of the year.

Ordering in Time for Christmas

E-commerce shop owners will be faced with the task of packing and processing more orders than usual and also have to negotiate any hold ups with the UK postal service. Proactive owners will probably have already calculated the last available date on which an order can be placed to guarantee arrival in time for the big day.

I've put together a simple PHP script that dynamically counts down the amount of days remaining, along with a series of custom messages. All packaged in a neat little banner that can be easily added to your website or homepage.

Here's the PHP...

The PHP code initially starts off with a status which checks whether or not the date has passed, if not, it will output one of three messages depending on how close you are to the due date.

Customising for your Website

Customizing PHP is easy, you just need to set the date and messages that suits your requirements.

[list_style6]

  • 1. Enter your event date.
  • 2. output messages a, b, c & d

[/list_style6]