I think you have got this mostly worked out, the only problem that I can see with your current page is that you have the validations above the recordset. This will not work correctly since the validations are referencing a variable that is created in the recordset code. To resolve this you should swap the validation server behavior code with the recordset code so the top of your page looks like this:
<?php require_once('Connections/pawtabs_db.php'); ?>
<?php require_once("WA_ValidationToolkit/WAVT_Scripts_PHP.php"); ?>
<?php require_once("WA_ValidationToolkit/WAVT_ValidatedForm_PHP.php"); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$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_checkRS = "-1";
if (isset($_POST['email'])) {
$colname_checkRS = (get_magic_quotes_gpc()) ? $_POST['email'] : addslashes($_POST['email']);
}
mysql_select_db($database_pawtabs_db, $pawtabs_db);
$query_checkRS = sprintf("SELECT UserID FROM users WHERE UserEmail = %s", GetSQLValueString($colname_checkRS, "text"));
$checkRS = mysql_query($query_checkRS, $pawtabs_db) or die(mysql_error());
$row_checkRS = mysql_fetch_assoc($checkRS);
$totalRows_checkRS = mysql_num_rows($checkRS);?>
<?php
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$WAFV_Redirect = "";
$_SESSION['WAVT_r_216_Errors'] = "";
if ($WAFV_Redirect == "") {
$WAFV_Redirect = $_SERVER["PHP_SELF"];
}
$WAFV_Errors = "";
$WAFV_Errors .= WAValidateNM($totalRows_checkRS . "",-1,0,0,",.",true,1);
if ($WAFV_Errors != "") {
PostResult($WAFV_Redirect,$WAFV_Errors,"r_216");
}
}
?>