Aproach to based PHP authentication

From: Date: Thu, 29 Jan 2004 00:04:12 +0000
Subject: Aproach to based PHP authentication
Groups: php.general 
Request: Send a blank email to php-general+get-176147@lists.php.net to get a copy of this message
Hello everybody. I think this problem there was thousands of times in this forum, as the archives shows, so you can freely ignore me if I bother you. I have little auth php base that looks like: if(cookie) authcookie(); else if($_POST[uname] && $POST[pass]) authuser(); // and sets a cookie else printloginForm; This works and a lot of sites use a similar approach, but it has two notorious flaws: 1) need cookies (i can live with this one) 2) the browser repost $_POST variables so there is no way to set a expiration time for the cookie, because it will be seted again, at least until the browser were closed. So, one of the two things need to be sacrificated: the loginForm, and the comfortable $_POST array, or the possiblity of autmatic logoof based on the expiration of the cookie. What do you think will be the way to do in this situation? Thanks everybody. -- Fernando M. Maresca Cel: (54) 221 15 502 3938 Cel: 0221-15-502-3938

« previous php.general (#176147) next »