Server Validation for checkbox
I have a checkbox named tour_name within a repeat region(produces several checkboxes) and the checked value is
<?php echo $row_rs_pricing['tour_name']; ?>
I want to use validation toolkit to server validate that at least 1 checkbox is checked.
Using required/not blank produced this code---
<?php
if (($_SERVER["REQUEST_METHOD"] == "POST") && (isset($_SERVER["HTTP_REFERER"]) && strpos($_SERVER["HTTP_REFERER"], $_SERVER["SERVER_NAME"].$_SERVER["PHP_SELF"]) > 0) && isset($_POST)) {
$WAFV_Redirect = "";
$_SESSION['WAVT_camptelregistration_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateRQ(((isset($_POST["tour_name"]))?$_POST["tour_name"]:"") . "",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"camptelregistration");
}
}
?>
This did not work; I tested and did not check any box name="tour_name" but the page submitted?
thanks for your help,
Jim Balthrop