PHP form to email data AND take the user to a "thank you" page
<p>I am setting up a newsletter sign up form. I want simply for the users name and email address to be emailed from the form to me and the user to be taken to thankyou.html. Here is the code I am using:</p>

<pre><code>&lt;?
$name=$_POST['name'];
$email=$_POST['email'];
$to="MyEmail@MyEmail.net";
$message="$name signed up for the VooNews Newsletter. The e-mail address is: $email";
Header("Location: thankyou.html");
?&gt;
</code></pre>

<p>I get the following error:
Warning: Cannot modify header information - headers already sent by (output started at /home1/ladogade/public_html/voodoosunshine/submit.php:1) in /home1/ladogade/public_html/voodoosunshine/submit.php on line 6</p>

<p>Any thoughts?</p>
