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:
PHP Code:
if (!isset($submit)):
?>
[code for your form]
<?php
else:
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.");
}
This will only work however if you are using php_self as your form action. There are also ways of checking with Javascript, or you can add:
Code:
<INPUT TYPE="hidden" NAME="REQUIRED" VALUE="email, name, sex, country">
Bookmarks