954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

I want to make free subscription area

(I want to make free subscription area where members' info is deleted from mysql when 30 days old)

I already have have a members login script.... but i have to manually delete users.....what i really need is to know how to make member expire after so many days with a php script. (free or very cheap) :eek:

mvblhp
Newbie Poster
5 posts since Dec 2004
Reputation Points: 10
Solved Threads: 0
 

(I want to make free subscription area where members' info is deleted from mysql when 30 days old)

I already have have a members login script.... but i have to manually delete users.....what i really need is to know how to make member expire after so many days with a php script. (free or very cheap) :eek:

Hello, I can do it for you or if you are PHP programmer can explain how to do :)

Regards

Arsench
Light Poster
36 posts since Oct 2008
Reputation Points: 10
Solved Threads: 2
 

Arsench, you do realize this thread is 5 years old don't you ?!

hashinclude
Junior Poster
111 posts since May 2007
Reputation Points: 11
Solved Threads: 8
 
Arsench, you do realize this thread is 5 years old don't you ?!


No, 5.5 years old and you ?

Arsench
Light Poster
36 posts since Oct 2008
Reputation Points: 10
Solved Threads: 2
 

If you're going to get technical, it's actually 5.20833 years old which makes hashinclude's number more accurate.

Either way, there was no need to reply. Considering the OP only posted 5 times within less than a month of joining, they probably have completely forgotten about this post/thread.

Fbody
Posting Maven
2,930 posts since Oct 2009
Reputation Points: 833
Solved Threads: 393
 

How WOULD you do it anyway? I am intrigued, enlighten me, Arsench :)

ElegantElephant
Light Poster
47 posts since Feb 2010
Reputation Points: 10
Solved Threads: 0
 

on login update lastlogin with sql now() the timestamp of now

delete low_priority from table where last_login < (now() - 2592000 ) order by last_login limit 100


2592000seconds=30 days
limit 100 to make sure no timeout and because a limit is usefull where there may be 10000000 members
low priority to ensure the login page the code is embedded in presents without delay

almostbob
Posting Sensei
3,149 posts since Jan 2009
Reputation Points: 571
Solved Threads: 376
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You