Repeating querystring on fail
Hi
Using server validations, if the validation fails I pass the fail=1 query string value.
If the form fails twice, this value gets passed twice. Three failures equals three instances of the query string value.
i.e
additem.php?fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1&fail=1
The validation code is
<?php
if (isset($_POST["BT_Submit"])) {
$WAFV_Redirect = "additem.php?fail=1";
$_SESSION['WAVT_additem_059_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["name"]))?$_POST["name"]:"") . "",true,1);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["stockcode"]))?$_POST["stockcode"]:"") . "",true,2);
$WAFV_Errors .= WAValidateRQ(((isset($_POST["description"]))?$_POST["description"]:"") . "",true,3);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"additem_059");
}
}
?>
Can I stop this from happening and just pass the on fail value?
Cheers
Ian