RE: [PHP-GENERAL] Cookies/Remeber password

From: Date: Tue, 20 Jun 2000 21:03:55 +0000
Subject: RE: [PHP-GENERAL] Cookies/Remeber password
Groups: php.general 
Request: Send a blank email to php-general+get-2350@lists.php.net to get a copy of this message
> > > 1.Is it a good idea to save username/password in a cookie? > > No, anyone with access to the user's machine can get their password. > This is why I'm gonna encrypt the data...Question is if it's > too risky to do > it using cookies, how can it be done? Well, technically, anyone with access to that machine would STILL be able to get into your stuff using your cookie. However, knowing your password might give them a clue to other passwords you might use for other systems. Since you already have their username and password on your side (in a mysql database as you mentioned earlier), there's no need to store it on the user's machine. Just store a unique gibberish token that you can lookup in your database and match to that user. For example, a 'cookie' table, or a session table. That way, at least you're not storing anything private on their machine.

« previous php.general (#2350) next »