Hi there, can anyone tell me why on earth this doesn't work
- If I keep only the empty fields condition it gives me the correct error message.
- If I put any other conditions in there, even if there is an empty field - that part seems to be skipped. No error message is given for an empty field!
What's happening - does anyone know?
//----Here's the code:
while(list($key,$val) = each($HTTP_POST_VARS)) {
if(empty($val)) {
$confirm .= "The <i>$key</i> field was left empty in the $submit form!<br>\n";
}
if($challengedate < date("d-m-Y")) {
//----Detect if the date+time at which a challenge is set/searched is after right now
$confirm = "The selected date occurs <i>prior</i> to now. Please try again.";
}
else {
//----Make inserts into database
$confirm = "Your challenge details have been submitted, and are now available for accepting by other users.";
}
}
Cheers
Russ