Posted 01 October 2006 - 05:21 PM
Here’s the problem im trying to solve. I want to allow users to register their email addresses on a site in order to receive a monthly newsletter. However to avoid spam I want to initially send an automated email to the address they registered with which will include a link which they can click on to verify that it was actually them. When the link is clicked in the email I then want that persons email address to be stored in the database.
Can anyone give me a clue?
Posted 01 October 2006 - 05:31 PM
and a field called activation code with something like this type: VARCHAR(50)
When they add their email and you add it to the database set is_activated to 0 and make a random activation code like
uniqid(md5($email.microtime());[code] Then send them a mail containg a link like this: http://example.com/activate.php?activation_code=**the activation code here**&email=**the email here** on the activate page you should check if the email matches the activation code, and if it does, then set is_activated to 1. When sending mails, only send it to email where is_activated is set to 1.[/code]
Posted 01 October 2006 - 05:38 PM
Thanks a lot!!!
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users