server validation
I am trying to manually add server validation to a small form. I am following the "add server validation" tutorial and it is unclear as to what page to add the server behaviour too.. the action page or the form page? although this might seem obvious to add to the forms page I just want to check because after the "Add Form Data" instructions ( which is to the actions page ) it proceeds to the "Configure Validations" instructions bit it does not say to open the form page so it assumes to stay on the action page.. Is this correct?
Plus when adding the server behaviour it gives a syntax error in line 4
below is the code that is added.
<?php require_once("webassist/form_validations/wavt_scripts_php.php"); ?>
<?php require_once("webassist/form_validations/wavt_validatedform_php.php"); ?>
<?php
if () {
$WAFV_Redirect = "apply-for-rtm-private.php";
$_SESSION['WAVT_thankyou_936_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["first_name"]))?$_POST["first_name"]:"") . "",false,1);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["surname"]))?$_POST["surname"]:"") . "",false,2);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["email"]))?$_POST["email"]:"") . "",false,3);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"thankyou_936");
}
}
?>