Re: Login with Remember me Feature

From: Date: Sun, 14 Aug 2011 18:02:49 +0000
Subject: Re: Login with Remember me Feature
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-314524@lists.php.net to get a copy of this message
Tim Streater <tim@clothears.org.uk> writes: > 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 Are you aware that your posts have some very strange and unique line endings?

« previous php.general (#314524) next »