Headers
Posted: Mon Jan 19, 2004 4:36 pm
Any idea what causes this errors I have checked for blank spaces
Notice: Undefined index: location in c:\program files\apache group\apache\htdocs\do_redirect.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\do_redirect.php:2) in c:\program files\apache group\apache\htdocs\do_redirect.php on line 3
This Is the code starting from the very top of the page line 1
------------------------------------------------------------------------------------
<?
if($_POST['location'] == ""){
header('Location: http://127.0.0.1/redirect_form.html');
exit;
} else {
header('Location: $_POST[location]');
exit;
}
?>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
Thanks for any help
Notice: Undefined index: location in c:\program files\apache group\apache\htdocs\do_redirect.php on line 2
Warning: Cannot modify header information - headers already sent by (output started at c:\program files\apache group\apache\htdocs\do_redirect.php:2) in c:\program files\apache group\apache\htdocs\do_redirect.php on line 3
This Is the code starting from the very top of the page line 1
------------------------------------------------------------------------------------
<?
if($_POST['location'] == ""){
header('Location: http://127.0.0.1/redirect_form.html');
exit;
} else {
header('Location: $_POST[location]');
exit;
}
?>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
</body>
</html>
Thanks for any help