|
Posted by deko on 06/12/06 15:06
> Put all the stuff that does output ("<form...", "<input...") after the
> header() call.
Okay, here's the header call:
<?php if ($valid_message)
{
header("Location:http://www.mysite.com/send-confirm.php");
exit();
}
?>
And here's the form:
<form action="
<?php
$message = trim($_REQUEST['message']);
$email_address = trim($_REQUEST['email_address']);
if (empty($message) || empty($email_address))
{
$valid_message = false;
}
else
{
mail( "my email address", "feedback form", $message, "from:
$email_address" );
$valid_message = true;
}
?>" method="POST" name="feedback" style="font-size:12px" >
<input name="email_address" type="text" size="30"/><br />
<textarea name="message" rows="12" cols="23"></textarea><br />
<input type="submit" value="Send">
</form>
I no longer get the error, but the page does not redirect.
I'm sure I must be missing something simple...
[Back to original message]
|