Current location: Hot Scripts Forums » Programming Languages » PHP » Is account going to expire in 5 days?


Is account going to expire in 5 days?

Reply
  #1 (permalink)  
Old 11-27-11, 03:17 PM
blackhawkso blackhawkso is offline
Newbie Coder
 
Join Date: Mar 2010
Posts: 39
Thanks: 3
Thanked 0 Times in 0 Posts
Question Is account going to expire in 5 days?

I have a member system and every member has an expiry date stored in the form of dd/mm/yyyy how can i work out if someone's account is going to expire in the next 5 days so i can alert them to this problem?

Cheers guys
__________________
Don't understand science?

Try religion lol
Reply With Quote
  #2 (permalink)  
Old 11-28-11, 01:51 AM
alxkls alxkls is offline
Newbie Coder
 
Join Date: Nov 2011
Posts: 98
Thanks: 0
Thanked 9 Times in 9 Posts
supposing that the date is sored in a database:

Code:
$sql="select * from my_table where expiry date>='".date('d/m/Y')."' and date<='".date('d/m/Y', strtotime('+5 day'))."'";
and you are on from there
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help: how do i limit the account duration to 30 days... narutox PHP 1 12-11-07 03:06 AM
Remove user account after 30 days zoliky Database 2 07-06-06 05:50 AM


All times are GMT -5. The time now is 08:58 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.