my code doesn't work (php) : <p>my code save info in database but doesn't send the message to email and the alert message not work. 
can you help me , please ? </p>

<p>`

<pre><code>if(isset($_POST['send'])){
    $to = "nada_26_@hotmail.com"; // this is your Email address
    $subject = "Form contact";
    $subject2 = "Copy of your form submission";
    $name = $_POST['name'];
    $from = $_POST['email'];
    $subject3 = $_POST['subject'];
    $company = $_POST['company'];
    $content = $_POST['message'];
    $message = "Name: ".$name ." Subject: " . $subject3 . " Company: " . $company ."\n\n".$content;
    $message2 = "Here is a copy of your message " . "\n\n" . $_POST['message'];

    $headers = "From:" . $from;
    $headers2 = "From:" . $to;
    mail($to,$subject,$message,$headers); //send the message to the admin
    mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender


    $sql ="INSERT INTO threadnn_arab.contactus VALUES('$name','$from','$subject3','$company','$message','')";
    $result=mysql_query($sql); 
             echo "&lt;script&gt; alert('Mail Sent, Thank you, we will contact you shortly.'); &lt;/script&gt;";


                  header('Location: index.php?#contact');           
                }
?&gt;  `
</code></pre>
