Php Form Throwing an Error
<p><strong>PHP</strong>
Throwing error:: <code>syntax error, unexpected T_IS_NOT_EQUAL in C:\xampp\htdocs\urd\add_p_c.php on line 14</code>   . Anyone?</p>

<pre><code>&lt;?php
if(isset($_POST['submit'])){
    #Email Msg Details
    $emailSendTo = "myemail@email.com";
    $emailSubj = "New Professor / Course Suggestion";
    $_POST['name']= trim(strip_tags(addslashes($string)));
    $_POST['deptName']= trim(strip_tags(addslashes($string)));
    $_POST['email']= trim(strip_tags(addslashes($string)));

/* I can't remember if it should be '' or NULL, but some simple testing will let you know which it is*/
    if($_POST['addType'] != NULL){
         if($_POST['name'] != NULL){
            if($_POST['deptName'] != NULL){
                if($_POST['email']) != NULL){
                    $selected_radio = $_POST['addType'];
                    $course_prof_name = $_POST['name'];
                    $select_dep = $_POST['deptName'];
                    $email = $_POST['email'] = "myemail@email.com"; 
                    if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $emailSendTo)) { 
                        return; 
                    } 
                    else { 
                        echo "&lt;span color='red;'&gt;Invalid email address.&lt;/span&gt;"; 
                    } 
                }
                else{
                    echo "&lt;span color='red;'&gt;Oops need an email address.&lt;/span&gt;";
                }
            }
            else{
                echo "&lt;span color='red;'&gt;Oops need a department.&lt;/span&gt;";
            }
        }
        else{
            echo "&lt;span color='red;'&gt;Oops need a name.&lt;/span&gt;";
        }
    }
    else{
        echo "&lt;span color='red;'&gt;Please select a radio option.&lt;/span&gt;";
    }
}
    $email_message .= "Suggestion Type: ".clean_string($selected_radio)."\n";
    $email_message .= "Suggestion Name: ".clean_string($course_prof_name)."\n";
    $email_message .= "Department: ".clean_string($select_dep)."\n";
    $email_message .= "Email: ".clean_string($email)."\n";   

// create email headers
$headers = 'From: Anonymous User '."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($emailSendTo, $emailSubj, $email_message, $headers);  
?&gt;
</code></pre>

<p><strong>HTML</strong></p>

<pre><code>&lt;form action='add_p_c.php' method='post'&gt; 
    Professor&lt;input type='radio' name='addType' /&gt;&amp;nbsp;&amp;nbsp;Course&lt;input type='radio' name='addType' /&gt; 
    &lt;br&gt;&lt;br&gt;Name: &lt;input type='text' name='name' /&gt;&lt;br&gt; 
    Department: &lt;select name='deptName'&gt;&lt;option&gt;Department 1&lt;/option&gt; &lt;option&gt;Department 2&lt;/option&gt;&lt;/select&gt;
    Email: &lt;input type='text' name='email' /&gt;&lt;br&gt;
    &lt;input type='submit' name='submit' /&gt; 
&lt;/form&gt; 
</code></pre>

<p><strong>FIXED myself, but thanks anyways.</strong></p>
