PHP doesn't Work
<p>I have a PHP form and HTML, shown below:</p>

<pre><code>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
    &lt;title&gt;Page Title&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;form&gt;
&lt;form action="emailform.php" method="post"&gt; 
&lt;table width="400" border="0" cellspacing="2" cellpadding="0"&gt; 
&lt;tr&gt; 
&lt;td width="29%" class="bodytext"&gt;Your name:&lt;/td&gt; 
&lt;td width="71%"&gt;&lt;input name="name" type="text" id="name" size="32"&gt;&lt;/td&gt; 
&lt;/tr&gt; 
&lt;tr&gt; 
&lt;td class="bodytext"&gt;Email address:&lt;/td&gt; 
&lt;td&gt;&lt;input name="email" type="text" id="email" size="32"&gt;&lt;/td&gt; 
&lt;/tr&gt; 
&lt;tr&gt; 
&lt;td class="bodytext"&gt;Comment:&lt;/td&gt; 
&lt;td&gt;&lt;textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"&gt;&lt;/textarea&gt;&lt;/td&gt; 
&lt;/tr&gt; 
&lt;tr&gt; 
&lt;td class="bodytext"&gt;&amp;nbsp;&lt;/td&gt; 
&lt;td align="left" valign="top"&gt;&lt;input type="submit" name="Submit" value="Send"&gt;&lt;/td&gt; 
&lt;/tr&gt; 
&lt;/table&gt; 
&lt;/form&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>and emailform.php</p>

<pre><code>&lt;?php 
if ($_POST["email"]&lt;&gt;'') { 
    $ToEmail = 'slmnwise@gmail.com'; 
    $EmailSubject = 'Site contact form '; 
    $mailheader = "From: ".$_POST["email"]."\r\n"; 
    $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; 
    $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; 
    $MESSAGE_BODY = "Name: ".$_POST["name"]."&lt;br&gt;"; 
    $MESSAGE_BODY .= "Email: ".$_POST["email"]."&lt;br&gt;"; 
    $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"])."&lt;br&gt;"; 
    mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); 
?&gt; 
Your message was sent
&lt;?php 
} else {
}
?&gt; 
</code></pre>

<p>and i put them in seperate pages and tried to perform the action of sending the email, but nothing happens, it just shows a different URL and stays that way. Does it neeed to be up online to work? or am i doing something wrong</p>
