Re: Re: [PHP] Login with Remember me Feature
| From: | Tim Streater | Date: | Sun, 14 Aug 2011 17:54:00 +0000 |
| Subject: | Re: Re: [PHP] Login with Remember me Feature | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-314523@lists.php.net to get a copy of this message | ||
On 14 Aug 2011 at 14:23, Alekto Antarctica <alekto.antarctica@gmail.com> wrote:
> *function loggedin()*
> *{*
> * if (isset($_SESSIONS['username']) || isset($_COOKIE['username']))*
> * {*
> * $loggedin = true;*
> * return $loggedin;*
> * }*
> *}*
Why not just return true;
And what happens if your "if" doesn't evaluate to true? What do you return then?
> *<?php*
> *
> *
> *if (loggedin==true)*
> *{*
Should this be:
if ($loggedin==true) ...
--
Cheers -- Tim