Thx Jason.
I'm using the following code:
if ("" == "") {
$WAFV_Redirect = "res_formular1.php?ERROR=8&Sitzungszimmer=".$_SESSION['sessSitzungszimmer']."&Datum=".$_SESSION['sessDatum']."&Dauer=".$_SESSION['sessDauer']."&Bestuhlung=".$_SESSION['sessBestuhlung']."&EventVon=".$_SESSION['sessEventVon']."&EventBis=".$_SESSION['sessEventBis']."";
$_SESSION['WAVT_resformular2_612_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateNM(((isset($_POST["EventVon"]))?$_POST["EventVon"]:"") . "",0,((isset($_POST["EventBis"]))?($_POST["EventBis"]-15):""),"",",.",true,4);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"resformular2_612");
}
}
So the validation takes place before the page loads, this works. But If I submit the form the validation runs again and redirects to the first page.