PHP script to send email from form
<p>Can someone please tell me how to fix this script so the form info is sent to the correct email (i.e., my email....lets assume my email is username@mydomain.net). I would like the email to show the user's email addrress who sent to to me as well.</p>

<pre><code>&lt;?php
$name = $_POST['fldName'];
$email = $_POST['fldEmail'];
$phone = $_POST['fldPhone'];
$comments = $_POST['fldComments'];
$isFormValid = false; 

if (strlen($name) &amp;&amp; strlen($email) &amp;&amp; strlen($phone) &amp;&amp; strlen($comments)) $isFormValid = true; 

if ($isFormValid) 

{ 


$to      = 'username@mydomain.net'; 
$subject = 'Contact Us Form Comments'; 

$message = 'Name: '.$name."\r\n".'Email: '.$email."\r\n".'Comments: '.$comments; 

$headers = 'From: username@domain.net' . "\r\n" 
         . 'Reply-To: username@mydomain.net' . "\r\n"; 

mail($to, $subject, $message, $headers);

header("location: thankyou.html");

} 
else 
{ 

echo "Please fill in the required fields"; 

} 

?&gt;
</code></pre>
