Page 1 of 1

Code for a opt-in feature

Posted: Mon Aug 21, 2006 9:26 am
by PastorHank
In my application I've been able to create all of the user registration without any problem, now however I'm looking for some ideas on a (I guess it's called) a double opt-in module. (I want the program to send them an email and have them click on an activation link - am I using the correct terminology?)

In the tutorials forum, I found an authentication program, but it doesn't seem to be what I'm looking for, when I google the term, I get all sorts of strange and wonderous sites, that talk about the need for such a thing but no clear examples.

Would someone please point me in the right direction?

Thank you

Posted: Mon Aug 21, 2006 9:30 am
by GeXus
Are you already sending mail?

Basically will you need to use some sort of mail agent or mail() and send an email to the user. Then add a field in your DB called "double_optin" or whatever you like... When the user recieves the email, have a link that they must click on (ie, verify.php?uid=userid). Then when the user clicks on that link, update double_optin to "1" or however you would like to show the user is double opted-in.

Posted: Mon Aug 21, 2006 9:32 am
by PastorHank
Yes I am sending mail in another module, so I can figure that part out....this sounds so simple...thank you