Page 1 of 1

header redirect not working

Posted: Wed Jun 21, 2006 4:47 am
by hame22
Hi I have the following script:

Code: Select all

if(empty($_POST['title']) ||  (empty($_POST['strap_line'])) || (empty($_POST['product_code'])) || (empty($_POST['pages'])) || ($_POST['category'] =="error") || ($_POST['manual'] == "error") || ($_POST['auth_name'] == "error") || (empty($_POST['url_path'])))
	{
		header('Location:page1.php?action=required');
	}	
	elseif(!is_numeric($_POST['pages']))
	{
		header("Location: page1.php?action=numeric");
	}
	else
	{	
	}
however the header(location ..) part of it does not redirect back appropriatley, the script works as when i substitue a error message this is displayed.


Any ideas why this could be the case?

thanks in advance

Posted: Wed Jun 21, 2006 7:24 am
by Maugrim_The_Reaper
Try using the full format:

header('Location: http://myserver.com/page.php?var=value');

With the full URI if possible. Is display_errors enabled in your PHP ini?