943,880 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 2102
  • PHP RSS
Jul 15th, 2009
0

User Registration System In PHP/MySQL

Expand Post »
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 .
Similar Threads
Reputation Points: 17
Solved Threads: 6
Posting Pro in Training
ayesha789 is offline Offline
485 posts
since Jun 2009
Jul 15th, 2009
0

Re: User Registration System In PHP/MySQL

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,
Reputation Points: 49
Solved Threads: 22
Junior Poster
Menster is offline Offline
175 posts
since Jun 2009
Jul 15th, 2009
0

Re: User Registration System In PHP/MySQL

Thanks.
Its good.
But How to send Emailwith a conformation page?
Reputation Points: 17
Solved Threads: 6
Posting Pro in Training
ayesha789 is offline Offline
485 posts
since Jun 2009
Jul 15th, 2009
0

Re: User Registration System In PHP/MySQL

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:
html Syntax (Toggle Plain Text)
  1. <a href="http://www.mysite.com/confirmation.php?user_id=[I]SOME_UNIQUE_IDENTIFER[/I]">Click here to confirm your registration</a>
Last edited by Menster; Jul 15th, 2009 at 5:52 am.
Reputation Points: 49
Solved Threads: 22
Junior Poster
Menster is offline Offline
175 posts
since Jun 2009
Jul 15th, 2009
0

Re: User Registration System In PHP/MySQL

Whrere I put this code in my form?
and can I use mail() on a local network?
Reputation Points: 17
Solved Threads: 6
Posting Pro in Training
ayesha789 is offline Offline
485 posts
since Jun 2009
Jul 15th, 2009
0

Re: User Registration System In PHP/MySQL

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.
Reputation Points: 49
Solved Threads: 22
Junior Poster
Menster is offline Offline
175 posts
since Jun 2009
Jul 15th, 2009
0

Re: User Registration System In PHP/MySQL

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
Reputation Points: 32
Solved Threads: 14
Junior Poster
tuse is offline Offline
173 posts
since Jul 2007
Jul 16th, 2009
0

Re: User Registration System In PHP/MySQL

Nice. I will check but explaion with some example.
Reputation Points: 17
Solved Threads: 6
Posting Pro in Training
ayesha789 is offline Offline
485 posts
since Jun 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: wamp services didn't start after installation
Next Thread in PHP Forum Timeline: Image Uploading error??





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC