|
-
HTML, PHP Contact form
I've followed some tutorials from the internet about making a HTML and PHP contact form, all went well (i can receive emails using the form) except when i try to redirect it to a new HTML page after submitting the email, it shows an error.
Warning: Cannot modify header information - headers already sent by (output started at /home/jasonro/public_html/speakartdesign/clients/plaxeld/contact.php:2) in /home/jasonro/public_html/speakartdesign/clients/plaxeld/contact.php on line 17
PHP Code:
<?
$subject="from ".$_POST['your_name'];
$headers= "From: ".$_POST['your_email']."\n";
$headers.='Content-type: text/html; charset=iso-8859-1';
mail("[email protected]", $subject, "
<html>
<head>
<title>Contact letter</title>
</head>
<body>
<br>
".$_POST['message']."
</body>
</html>" , $headers);
header('Location: sent.html');
?>
If i don't put that last line, header('Location: sent.html');, it'll go to a blank page, but that's not what i want. I want it to be redirected to a page where it says that their email has been sent, but it doesn't work if i put that header('Location: index.html');.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|