PHP header function not working (urgent)
Posted: Fri Apr 08, 2005 4:16 am
my header function is not working...it doesnt gives any error but doesn't redirects either..any clue why?
A community of PHP developers offering assistance, advice, discussion, and friendship.
http://forums.devnetwork.net/
Code: Select all
session_start();
if(!isset($search))
$search=0;
if(!isset($_SESSION['auth']))
$_SESSION['auth']=0;
if(!isset($_SESSION['admin']))
$_SESSION['admin']=0;
if(!isset($_SESSION['member_type']))
$_SESSION['member_type']=4;
if(!isset($_SESSION['art_upload']))
$_SESSION['art_upload']=0;
if(!isset($_SESSION['main_id_']))
$_SESSION['main_id_']="";
if($_SESSION['admin']==0||$_SESSION['auth']==0)
header("Location : ../../index.php");Code: Select all
header("Location : http://www.sdf.com/dmo/ioc/index.php");Code: Select all
$_SESSION['admin']==0||$_SESSION['auth']==0Code: Select all
header("location : http://www.yahoo.com") or die();yes, i know the header function wont work if you echo before you call it, that doesn't matter, we are taking a step back to determine the variables are what you think they arelocalhost wrote:i have done that too...and as far as i know if you echo something before header() function it doesn't work... but when i did that
Code: Select all
echo $_SESSION['admin'];
echo $_SESSION['auth']Code: Select all
echo "i got to here";Code: Select all
header("Location : ../../index.php");Code: Select all
header("Location: ../../index.php");