(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:

Recommended Answers

All 6 Replies

(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, you do realize this thread is 5 years old don't you ?!

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

No, 5.5 years old and you ?

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.

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

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

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.