Hi again,
I removed page access...At this point nothing can be entered.
Here is VALADATION code.
<?php
if (isset($_POST["submitcenter"])) {
$WAFV_Redirect = "alreadyentered.php";
$_SESSION['WAVT_centerinput_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateNM($row_rsverify['VisitorID'] . "",0,0,"",",.",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"centerinput");
}
}
?>
Here is recordset code:
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
$colname_rsverify = "-1";
if (isset($_POST[''])) {
$colname_rsverify = (get_magic_quotes_gpc()) ? $_POST[''] : addslashes($_POST['']);
}
mysql_select_db($database_bowlingtournaments, $bowlingtournaments);
$query_rsverify = sprintf("SELECT VisitorID FROM centers WHERE VisitorID = %s", GetSQLValueString($colname_rsverify, "text"));
$rsverify = mysql_query($query_rsverify, $bowlingtournaments) or die(mysql_error());
$row_rsverify = mysql_fetch_assoc($rsverify);
$totalRows_rsverify = mysql_num_rows($rsverify);
?>