Expire Database Entries

Ralph van den Berg's picture

Here's a question, let's say the method for signing up for my new website would be to register your email address, and then you get a link to follow in your email, and then you complete the rest of the registration.

I want to make it so that these entries expire, meaning that if somebody gives their email address, but then never follows the link to register, that entry will eventually disappear.

I was thinking to make it expire in maybe 7 days, because if somebody tries to register and accidentally deletes the email, they can't join. If they ask for another one of those emails, it will say that that email is already in the database.

I've been thinking of several ways to do this, maybe checking other parts of user information to see if they are a member already or not, but nevertheless, I'm still curious if some kind of automated checks can be run to see if any entries are more than a certain age, and have PHP automatically perform some actions (such as delete).

I'm eager to hear what people know about this, so please respond to this forum.

Ralph van den Berg
visit RalphvandenBerg.com