You are here: Re: Sending authentication mails « PHP Programming Language « IT news, forums, messages
Re: Sending authentication mails

Posted by Pedro Graca on 01/19/06 22:17

Bert Bos wrote:
> when users are register on our website, their username, encrpyted
> password and so on are stored in the mySQL database.
>
> Many phpbb sites though send an activation mail to the email address
> specified by the user. The user then needs to select a link to get his
> account activated.
>
> I would like to implement this process, can anyone tell me how this is done?

After the registration data is saved to the database, send them a link
to a validate.php script

http://www.example.com/validate.php?code=78Jh5qM0

The code in the link could be random and saved to the database.
When, later, the user access the script, you search the database for the
code and update the record indicating that this particular user has
validated.

$sql = "update user_table set validated=1 where code='{$_GET['code']}'";

Make sure every (unvalidated) code is unique in the database.

Also try to prevent people from validating random accounts by locking
out a 'connection' that fails after three (or whatever) attempts.

Hope this helps.

--
If you're posting through Google read <http://cfaj.freeshell.org/google>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация