i cannot send mails to a person and also connect to database
<p>i have a problem in sending emails,,,i have database: facebook, table: messages, fields: message_id AI (primary), member_id, recepient, datetime....
this is my code..plz help me those who concern..i dont know how to send to the person i want and also to insert it into database here is my code:</p>

<pre><code>&lt;?php
mysql_connect("localhost", "root", "") or die(mysql_error()); 
mysql_select_db("facebook") or die(mysql_error()); 

if (!isset($_POST['facebook']))  {
    $emailSubject='From EyEface';
    $eyeface= 'admin@eyeface.com';

    $name = $_POST['name'];
    $email = $_POST['email'];
    $comments = $_POST['comments'];

    $body = &lt;&lt;&lt;EOD

Name: $name&lt;br /&gt;
Email: $email&lt;br /&gt;
Comments: $comments
EOD;

    $headers = "From: $email\r\n";
    $headers = "Content-type: text\r\n";
    $success-mail ($eyeface, $emailSubject, $body, $headers);

    $result = &lt;&lt;&lt;EOD

    &lt;form name="form1" method="post" action="message.php"&gt;
    &lt;table width="100%" border="0" cellspacing="0" cellpadding="6"&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;label for="email"&gt;
            &lt;div align="right"&gt;Email Address:&lt;/div&gt;
          &lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;div align="left"&gt;
            &lt;input name="email" type="text" id="email" size="35" maxlength="100"&gt;
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;label for="name"&gt;
            &lt;div align="right"&gt;Name:&lt;/div&gt;
          &lt;/label&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;div align="left"&gt;
            &lt;input name="name" type="text" id="name" size="35" maxlength="80"&gt;
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;


      &lt;tr&gt;
        &lt;td&gt;
          &lt;div align="right"&gt;
            &lt;label for="comments"&gt;Comments:&lt;/label&gt;
          &lt;/div&gt;
        &lt;/td&gt;
        &lt;td&gt;
          &lt;div align="left"&gt;
            &lt;textarea name="comments" id="comments" cols="26" rows="5"&gt;&lt;/textarea&gt;
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;&lt;div align="right"&gt;&lt;/div&gt;&lt;/td&gt;
        &lt;td&gt;&lt;div align="left"&gt;&lt;/div&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;
          &lt;div align="right"&gt;
            &lt;label for="clear"&gt;&lt;/label&gt;
            &lt;input type="reset" name="clear" id="clear" value="Reset Form"&gt;
          &lt;/div&gt;&lt;/td&gt;
        &lt;td&gt;
          &lt;div align="right"&gt;
            &lt;label for="submit"&gt;&lt;/label&gt;
            &lt;div align="left"&gt;
              &lt;input type="submit" name="submit" id="submit" value="Send Email!"&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/form&gt;

    EOD;
    echo "$result";
}
?&gt;
</code></pre>
