| | |
User Registration System In PHP/MySQL
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
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 .
Ayesha
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,
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,
$me = new Person();
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
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)
<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.
$me = new Person();
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
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.
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.
$me = new Person();
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
if (isset($_COOKIE)){
$me->eat($_COOKIE);
} else { $me->starve(); }
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
My blog on .NET- http://dotnet.tekyt.info
![]() |
Similar Threads
- php user registration (PHP)
- Looking for a PHP/MYSQL Programmer (Web Development Job Offers)
- Need Highly Experienced PHP/MySQL Programmer $15-$25/hour (Web Development Job Offers)
- Exams Registration system (IT Professionals' Lounge)
- PHP/MySQL Programmer Position (Web Development Job Offers)
Other Threads in the PHP Forum
- Previous Thread: wamp services didn't start after installation
- Next Thread: Image Uploading error??
| Thread Tools | Search this Thread |
301 apache api array autosuggest beginner binary broken cakephp checkbox class cms code compression cron curl data database date display dropdownlist dynamic echo email eregi error execution file files folder form forms function functions google href htaccess html httppost if...loop image include insert ip javascript joomla jquery key library limit link links login mail md5 menu mlm multiple mysql mysql_real_escape_string oop paypal pdf pdfdownload php phpvotingscript problem query radio random recursion remote screen script search searchbox server session sessions sms sorting source space sql syntax system table tutorial update upload url validator variable video volume votedown web website youtube zend





