...

View Full Version : user registration using email verification



avizhome
04-01-2010, 03:48 PM
i have done a user registration form and when users click submit, it updates the user database and flags a value 0 in an active field in users table. Now i want to send users an url and when they click on the url the active flag in my users table should change.
Can anyone please help me on this?
Thanks

Fumigator
04-01-2010, 04:26 PM
I'm not really clear what part you need help with... the update query? Or what specifically has you tripped up?

avizhome
04-02-2010, 03:25 AM
actually i have a user table with the following field:
ID NAME PASS EMAIL ACTIVE
and i have user registration form which ask users for the above details, excluding the "active" part, which by default is false. I want to send a URL to the user in their given email and when they click on that URL then the "active" field should change to True.

Thanks

shadowmaniac
04-02-2010, 03:50 AM
I'd suggest adding another field to that table.
Then whenever you create an account, generate a random string of alphanumeric characters and store it in that field.
Afterwards, send an email to the user with a specific link such as "http://www.mysite.com/activate_user.php?email=johndoe@email.com&key=sadaqwe348194085ry324" where key is the generated random string

Before activating, check the email address and verify the "key" associated to it and also make sure "active" is still set to FALSE. If those conditions are met, update "active" to TRUE.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum