It depends what language you are using, cos there are lots of different ways to do it. Browsing your code it looks like PHP, so you can do this:
[code for your form]
if ($email=="" or $name=="" or $sex=="" or $country=="")
error("One or more required fields were left blank.\\n".
"Please fill them in and try again.");
<INPUT TYPE="hidden" NAME="REQUIRED" VALUE="email, name, sex, country">