Update user's status based on date

Hi All -

I have a complex php mysql admin backend in place for my company, a wireless ISP. What I am trying to do is update the “STATUS” field which describers if a subscriber is active, expired, cancelled or renewed based on the information stored in the “END” field. The “END” field is a date stored as 01/15/2009 for example, depending on when the registered or signed up.

Basically if todays date is 01/01/2009, and their subscription ends 01/15/2009 their STATUS should show “RENEWAL”. If todays date is 01/31/2009 and their subscription ends 01/15/2009 their STATUS should show “EXPIRED”. Anything else should say active if the “END” date is more than 30 days away.

Does that make any sense? I’m having difficulty finding code that works.

Thanks for the help, much appreciated.

Andrew