1) in the number validation, you have set the minimum number to 0, set it to 1 instead.
2) The code for the recordset is at lines 20 - 60:
<?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_rsMemberAreaReg = "-1";
if (isset($_POST['Email_M1'])) {
$colname_rsMemberAreaReg = (get_magic_quotes_gpc()) ? $_POST['Email_M1'] : addslashes($_POST['Email_M1']);
}
mysql_select_db($database_connOESCA, $connOESCA);
$query_rsMemberAreaReg = sprintf("SELECT Member_Account_ID, Email_M1 FROM member_accounts WHERE Email_M1 = %s AND Registered = 0", GetSQLValueString($colname_rsMemberAreaReg, "text"));
$rsMemberAreaReg = mysql_query($query_rsMemberAreaReg, $connOESCA) or die(mysql_error());
$row_rsMemberAreaReg = mysql_fetch_assoc($rsMemberAreaReg);
$totalRows_rsMemberAreaReg = mysql_num_rows($rsMemberAreaReg);?>
move it to line 5 so the recordset is created before the validation occurs.