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,

Thanks.
Its good.
But How to send Emailwith a conformation page?

You don't send them a confirmation page, just a link. For example after you've created their temp profile on the page wherever the form gets submitted to, just send the an e-mail using the mail() function and in that e-mail's body include a link eg:

<a href="http://www.mysite.com/confirmation.php?user_id=[I]SOME_UNIQUE_IDENTIFER[/I]">Click here to confirm your registration</a>

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

Nice. I will check but explaion with some example.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.