Hello, I am having problems with a contact form in PHP. When I click submit, it goes back to the main page, but does not send the e-mail. I have looked over this and can't seem to find the error. Does anyone have any ideas? It would be highly appreciated.

Here is the code:

Code:
<? 

    $mail_ontv = "dougparker86@gmail.com"; 

    if (!$_POST[submit] || $_POST[submit] && (!$_POST[name] || !$_POST[mail] || !$_POST[msggs] || !$_POST[subject])) 

    { 

        if ($_POST[submit] && (!$_POST[name] || !$_POST[mail] || !$_POST[msggs] || !$_POST[subject]))  

        { 

            echo "<p><font color=red><b>Please check to see if you have filled in all fields correctly.</b></font></p>"; 

        } 

        echo "<p>Use the form below to contact the staff team. Any hate mail or hate comments will be dealt with accordingly.</p><TABLE BORDER=0 class=content width=90% CELLSPACING=1 CELLPADDING=1 align=center>"; 

        echo "<FORM METHOD=POST ACTION=/?d=home>"; 

        echo "<TR class=table1><TD><p align=right><b>Your Name </b></TD>"; 

        echo "<TD><INPUT TYPE=text NAME=name VALUE=\"$_POST[name]\"></TD></TR>"; 

        echo "<TR class=table2><TD><p align=right><b>Your Email </b></TD>"; 

        echo "<TD><INPUT TYPE=text NAME=mail VALUE=\"$_POST[mail]\"></TD></TR>"; 

        echo "<TR class=table1><TD><p align=right><b>Subject </b></TD>"; 

        echo "<TD><select name=subject VALUE=\"$_POST[subject]\">

<option value=\"Feedback\">Feeedback</option>

<option value=\"Support\">Support</option>

<option value=\"Package Information\">Package Information</option>

<option value=\"Miscellaneous\">Miscellaneous</option>

</select></TD></TR>"; 

        echo "<TR class=table2><TD><p align=right><b>Message </b></TD>"; 

        echo "<TD><TEXTAREA NAME=msggs ROWS=6 COLS=45>$_POST[msggs]</TEXTAREA></TD></TR>"; 

        echo "<TR><TD colspan=2><center><INPUT TYPE=submit NAME=submit VALUE=\"Send\"> <input type=reset name=Reset value=Reset></center></TD></TR>"; 

        echo "</FORM>"; 

        echo "</TABLE>"; 

    } 

    else 

    {     

        $datum = date("d/m/Y H:i"); 

        $ip = $REMOTE_ADDR; 

         

        $inhoud_mail .= "Name: $_POST[name]\n"; 

        $inhoud_mail .= "Email: $_POST[mail]\n"; 

        $inhoud_mail .= "Message:\n"; 

        $inhoud_mail .= "$_POST[msggs]\n\n"; 

         

        $inhoud_mail .= "Send on $datum via IP $ip\n\n"; 

         

        mail($mail_ontv, $_POST[subject], $inhoud_mail, "From: $_POST[name] <$_POST[mail]>"); 

         

        echo "<META http-equiv=REFRESH content=5; URL=http://www.mysite.com/ charset=ISO-8859-1>Your email has been sent to the DCDP Design team. Expect a reply within the next 48 hours.";     

    } 

?>
I've edited out the links to my site, to avoid "spamming my site on yours", or w/e.