 <p>At the Servers side you can just check for:</p> <pre><code>if(isset($_POST['name'])) { } // only send the mail if this is true. </code></pre> <p>There are also many client side solutions. You could also write your own using Javascript. You will have to still include the checks on the server-side tho since "client-side security does not work".. The user could just disable Javascript and submit the form without the checks running.</p> <p>Here is an example for a JS library that does form validation:</p> <p><a href="http://rickharrison.github.com/validate.js/" rel="nofollow">http://rickharrison.github.com/validate.js/</a></p> <p>I found it by googling for <code>javascript form validation</code></p>