note 29781 rejected from ref.session by rioter
| From: | rioter@php.net | Date: | Tue, 25 Feb 2003 04:24:30 +0000 |
| Subject: | note 29781 rejected from ref.session by rioter | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-44473@lists.php.net to get a copy of this message | ||
<?
function isLogin(){
global $_SESSION,$_COOKIE;
if ($_SESSION['S']==$_COOKIE['S'])return true;
return false;
}
if (isLogin()){
$_SESSION['islogin']=1;
} else {
$_SESSION['islogin']=0;
}
?>
set value to var session after call isLogin function was failed
i replace with
function isLogin($S,$C){
if ($S['S']==$C['S'])return true;
return false;
}
if (isLogin($_SESSION,$_COOKIES)){
$_SESSION['islogin']=1;
} else {
$_SESSION['islogin']=0;
}
thats fine, why?