Re: Session again !!!
| From: | Torsten Roehr | Date: | Sun, 05 Sep 2004 20:07:21 +0000 |
| Subject: | Re: Session again !!! | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-195946@lists.php.net to get a copy of this message | ||
"Dre" <dre00x@yahoo.com> wrote in message
news:20040905171513.74196.qmail@pb1.pair.com...
> I added print_r($_SESSION); after the session start();
> and the printed text was
>
> Array( )
Which means that your session value is NOT set. Your if/else should look
like this:
if (!isset($_SESSION['uname'])) {
header('Location: ../../index.php');
exit();
} else {
// output contents
}
Regards, Torsten Roehr