Hi, I am developing a website , in which I want guest to visit and make their accounts. when they make their account they give their information includeing Email and when they submit the button an email send to them for verification and when they click on a link their account will active. I have develop a table and a registration form but I have no idea about Email verification. so please please guide me with some example .

Hi there,
The logic behind the process is this:
First the user fills in the registration form & submits it
Then your site must process the submission & create a temporary/inactive user profile for the registrant, at the same time, your site must send a mail to the new registrant containing a link to an account confirmation page which then processes the user and finalizes/activates their account.

I find a good way to secure this (albeit lightly) is when you create a temp profile, have a column in your user table which is 0 for active and a unique identifier like 'md5(time()."".$user_email)' for any inactive users, then in the confirmation email, append that identifier to the link so that when the user follows it, the confirmation page can be certain of which user is trying to confirm their account.

Hope this helped,

Whrere I put this code in my form?
and can I use mail() on a local network?

That link goes into your e-mail body.
The code to send the e-mail goes on the page that your form submits to.
As for using mail() on a local network, I have no idea. It shouldn't be a problem though as long as your local server as a mail server installed.

Check with your network administrator if there is a mail server on your network. If you are running the website on your own server, you might have to configure your mail settings on the localhost

This article has been dead for over six months. Start a new discussion instead.