[FX.php List] Storing logins for clients

Bob Patin bob at patin.com
Fri Oct 5 15:37:16 MDT 2012


> For the record, our sites should never actually store the password on the DB side.  You should store an encryption of the password for moderate security sake.  MD5 is a simple hash but crackable and PHP has all sorts of "salted" encryption methods for obscuring the user passwords stored in a DB.



Yes, I know that, and use that whenever I develop a database (this one was done by the client).

I just added a line in my login procedure that stores the username; easy and quick

setcookie("username",$username, time()+3600*2160);

...stores it for 90 days.

Then when the login page loads, it pulls it back in with $_COOKIE['username'].

> As for your question about storing some form of Remember Me? checkbox, you'll need a persistent cookie to store some flag that the user is logged in.

That's not really what they're asking for; I think they're just lazy and don't want to have to type the username in everytime--I think some of his employees would rather it store passwords too (as Safari does on the Mac), but I'm not going to add that. I'm not going to encourage the client to let their users store the password, but it's always up to them at the end of the day...


Bob Patin
Longterm Solutions LLC
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
FileMaker 9, 10 & 11 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--
Twitter: bobpatin
Google+: http://www.longtermsolutions.com/plus
AIM: longterm1954
iChat: bobpatin
--
Expert FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker


On Oct 5, 2012, at 4:13 PM, Denis Somar <dsomar at gmail.com> wrote:

> 
> HTH,
> Denis
> 
> 
> 
> On Fri, Oct 5, 2012 at 4:07 PM, Bob Patin <bob at patin.com> wrote:
> One of my clients is asking if I can 'store' their logins (or at least their usernames) like many sites do.
> 
> Upon searching, I saw that using setcookie() was frowned upon, for obvious reasons; have any of you done this, and if so, do you have any code you could share?
> 
> Thanks,
> 
> Bob Patin
> Longterm Solutions LLC
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> FileMaker 9, 10 & 11 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --
> Twitter: bobpatin
> Google+: http://www.longtermsolutions.com/plus
> AIM: longterm1954
> iChat: bobpatin
> --
> Expert FileMaker Consulting
> FileMaker Hosting for all versions of FileMaker
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
> 
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20121005/6c5a7d41/attachment-0001.html


More information about the FX.php_List mailing list