How to check if correct email address is entered?
<p>I have this code</p>

<pre><code>&lt;?php
if(isset($_POST['submit'])) { 
$to =  "info@bodom.eu"; 
$subject =  "Form"; 
$name_field =  $_POST['name']; 
$email_field =  $_POST['email']; 
$message =  $_POST['message']; 

$body =  "From: $name_field\n E-Mail: $email_field\n Message:\n $message"; 

echo "&lt;div id='messageok'&gt; Ok. &lt;br /&gt;&lt;span&gt; Thank you. &lt;/span&gt;&lt;/div&gt;"; 
mail($to, $subject, $body);
}  else { 
echo "&lt;div id='messageok'&gt; Error. &lt;/div&gt;";
} 
?&gt;
</code></pre>

<p>and I need to check if the fields in the form are filled and if e-mail address is correct. Yes, I found many tutorials, but I am not very good in PHP and this code works for me. Thank you.</p>
