weikelbob
asked on
header:Location not working
What could be the reason the header:Location... below is not redirecting the browser?:
link: http://www.owndesigns.com/listen-newsletter/website/contact.html
<?php
$message = "Hello";
if (!mail('weikelbob@aol.com' ,'From Listen Website',$message)) die('Mail Failed!');
header("Location: http://www.owndesigns.com");
exit();
?>
link: http://www.owndesigns.com/listen-newsletter/website/contact.html
<?php
$message = "Hello";
if (!mail('weikelbob@aol.com'
header("Location: http://www.owndesigns.com");
exit();
?>
I don't see a problem with the header() syntax. What browser are you testing this with? Have you tried a different one?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You should get rid of the die() before the header().
I tested your form.. it doesn't appear to be a browser issue. However, it does look like there is a possibly a blank line being output before your header function is called. Make sure there is no blank space before your PHP tags in handler.php, I suspect there is.
The die couldn't be his problem, as it would be outputting "Mail Failed!" if it were being called.
ASKER
Tomeeboy hit it right on the nose. There was a blank space at the top of my script. That simple!
Thanks!.
Thanks!.
No problem! Glad it was that simple ;)