Jump to content

PHP Activations via email


limitphp

Recommended Posts

I want to verify people's email address when they register with my site.

When they click register, I want it to say a link has been sent to your email address to activate your account.

And when users open their email, i want them to be able to see a link that they click to activate their accounts.

I'm not sure on how to do this, but I have a little bit of an idea.

 

1. Do I need to build a table that temporarily holds the user data (username, password, fname, lname, email, etc) and includes a tempID?

 

2. When they click register to I fill that table with their info and then send out an email with a link with the tempID to a page on my site that takes the tempID matches it with the one in the table and if it matches, proceed to add the new user to the real user table?

 

3. Delete any entries manually? from the temp table that have an expired date of a week or whatever I set?

 

Am I close on how this is supposed to work?

Are there any important details I didn't mention?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/131820-php-activations-via-email/
Share on other sites

I wouldn't have a table that stores the users temporarily, just add a new validation field.  If they are validated then they are good, if not, then purge after a week.

 

So, on the page where they login, add an extra routine (not sure if thats the right word) that checks to see if validate = true?

 

If yes, log them in, if not send them a message or whatever.

 

What about the tempID in the email link?

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.