You are here: Re: Remember Me option « PHP Programming Language « IT news, forums, messages
Re: Remember Me option

Posted by Balazs Wellisch on 01/21/06 05:04

"pek" <kimwlias@gmail.com> wrote in message
news:1137806148.178510.59470@z14g2000cwz.googlegroups.com...
> Any ideas on how to create a remember me option in a login box..?
>

You need to save an ID, something you can use to identify users by, to a
cookie. Something like...

$setcookie( 'userId', $userID );

Then when they come back check for the value in the cookie structure.

if (isset( $_COOKIE['userId'] ))
{
$userId = $_COOKIE['userId'];
}

But, you have to be careful with the security risk this creates. At least
make sure that $userId is not a sequential number so it can't be faked to
gain unathorized access to someone else's records.

Balazs

 

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

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