Ok...so I grabbed this PHP contact form from a combination of a few different websites and from a predecessor. I've been wrestling with it for hours and can't figure it out. 

**In all fairness, know that PHP is not my strong suit, at all**, (I'm a client-side programmer). Here's the code below, please help if you can. Thank you!

**Here are some of the error messages I've seen:**

The most recent:
\*Parse error: syntax error, unexpected T\_IF in /home/[...] on line 11\*

Before, here was the error message, but I believe I fixed the "blank field" part:

*It appears that you left a blank field.*

*Please make sure you fill in your full name, email address, subject, and details.
Click the back arrow to return to the contact form.*

*From:... List:; syntax illegal for recipient addresses*

*Reply-To:... List:; syntax illegal for recipient addresses*

*X-Mailer:... List:; syntax illegal for recipient addresses* 

*Thank you, [name], for contacting us!*

**Here's the HTML**

```
<form action="contactus.php" method="post" class="create">
     <fieldset>
    <legend align="center">Please fill out details below and click "Submit"</legend>
    <div>
     <label for="fullname" class="fixedwidth">Full Name</label>
     <input type="text" name="fullname" id="fullname" class="input2"/>
    </div><br/>
    <div>
     <label for="email" class="fixedwidth">Email</label>
     <input type="text" name="email" id="email" class="input2"/>
    </div><br/>
      <div>
     <label for="subject" class="fixedwidth">Subject</label>
     <input type="text" name="subject" id="subject" class="input2"/>
    </div><br/>
    <div>
    <label for="details" class="fixedwidth">Body</label>
     <textarea id="details" name="details" cols="62" rows="20"></textarea>
    </div>
    <div class="buttonarea">
        <input type="submit" name="submit" id="submit" value="Submit"/>
    </div>

    </fieldset>
   </form>

```

**...and here's the contactus.php file:**

```
<?php

 $fullname = $_POST['fullname'];
 $subject = $_POST['subject'];
 $details = $_POST['details'];
 $email = $_POST['email'];

//*** Function to check email address */
 function checkemail($email) { 
  $regex = '/^[_a-z0-9-]+(\.[_a-z0-9-]+)@[a-z0-9-]+(\.[a-z0-9-]+)(\.[a-z]{2,3})$/'
   if (eregi($regex ,$email))
   { 
    return true; 
   } 
    else
   { 
    return false; 
   } 
 }

//*** Check to see if the email address is valid */
 else if (checkemail($email) == false) { 
  echo "<br/><br/><p><center>It appears that you have entered an invalid email address.<br/> Please check your email again.</p>";
 }

//*** Mail Processing */
 if ($_POST['submit']) {
 //Check for blank fields
  if ($fullname !== "" && $email !== "" && $subject !== "" && $details !== "") {
   echo "<br/><br/><p><center>It appears that you left a blank field.<br/> 
   Please make sure you fill in your full name, email address, subject, and details.<br/>
   Click the back arrow to return to the contact form.</p>";
  }

//*** Send Mail**/
 $to = 'sgraffito22@gmail.com';
 $fullname = $_POST['fullname'];
 $subject = $_POST['subject'];
 $details = $_POST['details'];

 $headers = 'From: '.$email."\r\n".
 'Reply-To: '.$email."\r\n" .
 'X-Mailer: PHP/' . phpversion();

 mail($to, $fullname, $subject, $details, $headers);
 echo "<br><br><p><center>Thank you, $fullname, for contacting us!</p><br><br>";

}

?> 

```