I think i understand what you mean..
So a user arrives on a page with this form, fills it out, forgets one field, clicks on submit, returns to the same form, only this time with an error message?
You just don't want this message to be displayed the first time someone enters the form?
Well, you can't check on the content of the vars, because presumably they're all empty the first time, which would directly display this error-message.
I had a similar problem and i did this:
if (!empty($vnaam) && !empty($anaam) && !empty($bnaam) && !empty($adres) && !empty($pcode) && !empty($plaats) && !empty($provin) && !empty($email) && !empty($country)) {
if (isset($klik)) {
if (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.'@'.'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.
'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$', $email)) {
if ($NL=="NETHERLANDS") {
header('Location: [url]http://[/url]$ip_adres/dothis.php');
} else {
header('Location: [url]http://[/url]$ipadres/dothat.php');
}
} else {
$email="Incorrect e-mail!";
}
}
}
So basically what i did was check to see if the variables were set, the first time a user's gets to the page.
I did it this way, because i preload the vars if a user logs in, and session_register them, i then echo them back into a form, so the form's pre-populated.
But what it did was move on directly to my header("location:... if all the vars were set, so i added a check to see if the button named $klik was set, in other words, was clicked. If not, the form displays all the data and waits for a click.
When clicked, it calls itself again, checks for the content of the vars, checks for correct e-mail, and redirects.
If in this case, e-mail's not ok, it displays the form, with an error at the e-mail field.
Maybe this will help.
thefisherman