Hey Gents,

Here is my Issue, i'm getting an error trying to get my form to submit and send emails. The development site is at www.marinetechegypt.com/contact.php

I tried it locally on my WAMP first, it wasn't sending so i decided to test on the server incase its a local config issue.

I just get an error from the If condition for if(isset($_POST['submit'])) {]. Im really trying my best to solve this but i'm not sure what i'm missing! any help would be greatly appreciated, thx

HTML Code:
    <div class="col one-half">
            <h3> Send us an Email </h3>
                <div class="ajax_message"></div>
                <form class="contact-form" method="post" action="php-mailer.php">
                    <input type="hidden" name="ac" value="login" />
                        <label for="fname"> Your Name <span class="required"> * </span> </label>
                        <input type="text" name="fname" class="input-short" id="fname" placeholder="Your Full Name" />
                        <?php if(isset($errName1)) echo $errName1; ?>
                        <label for="email"> Your Email <span class="required"> * </span> </label>
                        <input type="text" name="email" class="input-long" id="email" placeholder="Your Email" />
                        <?php if(isset($errEmail)) echo $errEmail; ?>
                        <label> Subject </label>
                        <input name="subject" type="text"  id="subject" class="input-short" placeholder="Subject"/>
                        <label for="message"> Your Message <span class="required"> * </span> </label>
                        <textarea name="message" class="textarea-message" id="textarea" placeholder="Your Message"></textarea>
                        <?php if(isset($errMessage)) echo $errMessage; ?>
                    <p><input name="submit" type="submit" value="Send Message" class="button small grey contact-submit" /></p> 
            <div class="error-container" style="display:none;"> Please fill the above required fields correctly! </div>
phpmailer file: are there missing dependencies for this php function or what? Ive changed the adressed to hide the emails and such

    if(isset($_POST['submit'])) {
           $to = "SendTo@email.com";
           $subject = "Marinetech Egypt Contact Form";
           $first_name_field = $_POST['fname'];
           $email_field = $_POST['email'];
           $message = $_POST['textarea'];
           $message = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    <html xmlns="http://www.w3.org/1999/xhtml">
        <tr><td>Name</td><td>' . $first_name_field . '</td></tr>
        <tr><td>Email</td><td>' .  $email_field . '</td></tr>
        <tr><td>Website</td><td>' . $subject . '</td></tr>
        <tr><td>Comment</td><td>' . nl2br($message) . '</td></tr>

            $headers = 'MIME-Version: 1.0' . "\r\n";
            $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";

            // Additional headers
          $headers .= 'To: <SendTo@email.com>' . "\r\n";
          $headers .= '[From] <SendFrom@email.com>' . "\r\n";

    // Mail it
   // ini_set('username' , 'SendFrom@email.com');
 //   ini_set('password' , 'XXXXXXXX');
//    ini_set('sendmail_from','SendFrom@email.com');
    mail($to, $subject, $message, $headers);
             } else {
                     echo "Error";