I have this function to check whether or not all of the fields of the form were filled out, and if not return an error...
function filled_out($form_vars)
{
// test that each variable has a value
foreach ($form_vars as $key => $value)
{
if (!isset($key) || ($value == ""))
return false;
}
return true;
}
so i do...
if( !filled_out($HTTP_POST_VARS) )
print("ERROR -- You didn't fill out all of the fields! \n");
but it says that $HTTP_POST_VARS is undefined, etc. What's happening? Why is it doing this.
There are roughly 10 or so fields in the form, 7 of them are text, the other 2 are passwords, and 1 is a selection box.
Please help, and thank you in advance.