Code for a opt-in feature

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
PastorHank
Forum Contributor
Posts: 117
Joined: Sat Jun 03, 2006 7:58 am
Location: Texas Hill Country

Code for a opt-in feature

Post 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
GeXus
Forum Regular
Posts: 631
Joined: Sat Mar 11, 2006 8:59 am

Post 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.
PastorHank
Forum Contributor
Posts: 117
Joined: Sat Jun 03, 2006 7:58 am
Location: Texas Hill Country

Post by PastorHank »

Yes I am sending mail in another module, so I can figure that part out....this sounds so simple...thank you
Post Reply