Using header(location: ......php) within a class not working
- From: "ajtrichards@xxxxxxxxxxxxxx" <ajtrichards@xxxxxxxxxxxxxx>
- Date: Tue, 19 Feb 2008 23:19:48 -0800 (PST)
Hi.
Can someone tell me why this code is not working?
<?php
session_start();
class tta_globals {
function check_session_state(){
if(!$_SESSION['logged_in']){
header('Location: login.php');
die();
}
}
}
$tta_globals = new tta_globals();
$tta_globals -> check_session_state();
?>
When I run this code it doesn't redirect the user? I have checked and
double checked to make sure that there is no session['logged_in']
anywhere.
Can anyone help?
Regards,
Alex.
Ajtrichards Web Solutions
http://www.ajtrichards.co.uk
.
- Follow-Ups:
- Re: Using header(location: ......php) within a class not working
- From: C. (http://symcbean.blogspot.com/)
- Re: Using header(location: ......php) within a class not working
- From: AnrDaemon
- Re: Using header(location: ......php) within a class not working
- From: Robin
- Re: Using header(location: ......php) within a class not working
- From: Toby A Inkster
- Re: Using header(location: ......php) within a class not working
- From: ELINTPimp
- Re: Using header(location: ......php) within a class not working
- Prev by Date: Re: MGooS
- Next by Date: Re: Different MSSQL output date format from the same PHP script
- Previous by thread: PHP, cron and stdout redirection
- Next by thread: Re: Using header(location: ......php) within a class not working
- Index(es):