Validation If not displaying for Validation Pass
I've always used Validation Show If to display a message if validation fails.
I've tried setting up a page that displays a message if validation passes, however despite the validation passing, confirmed by the appended querystring on $WAFV_Redirect, the Validation Show If section is not displaying.
The server behaviour...
<?php
if (isset($_POST["smcresetBTN"]) || isset($_POST["smcresetBTN_x"])) {
$WAFV_Redirect = "reset.php?ve=1";
$_SESSION['WAVT_reset_570_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateEM(((isset($_POST["SMCuserUSER"]))?$_POST["SMCuserUSER"]:"") . "",true,1);
$WAFV_Errors .= WAValidateUnique("csdbmysqli",$csdbmysqli,$database_csdbmysqli,"SMCuser","SMCuserID","none,none,NULL","0","SMCuserUSER","',none,''","".(((isset($_POST["SMCuserUSER"]))?$_POST["SMCuserUSER"]:"")) ."",true,2);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"reset_570");
}
}
?>
The form with the Validation Show If area...
<form action="" name="SMCresetpwFORM" method="post">
<div class="form-group">
<label for="SMCuserUSER" class="sr-only">E-mail address</label>
<input type="email" name="SMCuserUSER" id="SMCuserUSER" class="form-control" placeholder="Enter your e-mail address" value="<?php echo(ValidatedField("reset_570","SMCuserUSER")) ?>" required>
<?php
if (ValidatedField('reset_570','reset_570')) {
if ((strpos((",".ValidatedField("reset_570","reset_570").","), "," . "") >= 0)) {
if (!((strpos((",".ValidatedField("reset_570","reset_570").","), "," . "2" . ",") !== false || "2" == ""))) {
?>
<small class="text-danger">Are you sure you've entered the correct e-mail address?</small>
<?php //WAFV_Conditional reset.php reset_570(:2)
}
}
}?>
</div>
<button class="btn btn-info btn-block" type="submit" name="smcresetBTN" id="smcresetBTN"><i class="fal fa-key"></i> Reset Password</button>
</form>
Hope you can help. Thank you.
NJ