register validation send to e-mail
Hello, i have a form so people can register to receive a newsletter. But i want to make it better and after people register i want an e-mail to be sent to the email used to registered and then the person confirm it clicking on a link. Basicly like all forums do.
I just don't know how to generate the page that the link will point to.
I assume that lets say people will enter name, email and age.
then after people click register that date will be add to my db and i'll send a mail asking to click the link x. so far i know how to do that.
but then that link x needs to have some data like firstname.lastname@example.org, right?
And on the confirm page it will have some code that update the field with the e-mail email@example.com and activate it.
I'm just lost on which code should be writen on the confirm.php page and how this should be done more saftly because this way some smart guy know that if he write "blabla.com/confirm.php?mail=the email he wants to register" on his browser it will activate without problem
generate a activation code, wich is stored in the database when somebody registeres... Then in the email put a link in it with the activation code : blabla.php?code=activationCode
Then when the link is visited the account will be activated.
But you can only know the code if you search it in the email... That way you can make sure the entered email is theirs...
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)