Headers

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
stockdalep
Forum Newbie
Posts: 6
Joined: Wed Jul 02, 2003 12:29 am

Headers

Post by stockdalep »

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
User avatar
DuFF
Forum Contributor
Posts: 495
Joined: Tue Jun 24, 2003 7:49 pm
Location: USA

Post by DuFF »

>>> viewtopic.php?t=1157
Should solve your problems.
Post Reply