Re: maintaining [user] state without a session ...
| From: | tedd | Date: | Thu, 13 Mar 2008 16:24:59 +0000 |
| Subject: | Re: maintaining [user] state without a session ... | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-271521@lists.php.net to get a copy of this message | ||
At 4:01 PM +0000 3/13/08, Stut wrote:
tedd wrote:Oops, I guess I missed the whole point of your article. You want to minimize dB usage by using an encrypted cookie so that when users return, that action doesn't use the dB. But, once the user is on, then everything they request in the form of unique data is provided by the dB via their user id, correct? So, you saved one trip to the store, but how many trips to the store does a user usually make? And is that worth it? Not being critical, just wondering. Cheers, tedd -- ------- http://sperling.com http://ancientstones.com http://earthstones.comThen, when the user returns, you simply check the cookie with what's stored in the dB and continue as before. If the check fails (no session id or it has been altered), then start again.Because that negates the whole point of doing it which is to reduce database access to the minimum possible.