the code for the rsHse recordset is duplicated.
change lines 75 - 84:
mysql_select_db($database_CommSimpleRegister, $CommSimpleRegister);
$query_rsHse = "SELECT * FROM new_table ORDER BY fullname ASC";
setQueryBuilderSource($query_rsHse,$WADbSearch1,false);
$rsHse = mysql_query($query_rsHse, $CommSimpleRegister) or die(mysql_error());
$row_rsHse = mysql_fetch_assoc($rsHse);
$totalRows_rsHse = mysql_num_rows($rsHse);
$query_rsHse = "SELECT * FROM new_table ORDER BY fullname ASC";
$rsHse = mysql_query($query_rsHse, $CommSimpleRegister) or die(mysql_error());
$row_rsHse = mysql_fetch_assoc($rsHse);
$totalRows_rsHse = mysql_num_rows($rsHse);
to:
mysql_select_db($database_CommSimpleRegister, $CommSimpleRegister);
$query_rsHse = "SELECT * FROM new_table ORDER BY fullname ASC";
setQueryBuilderSource($query_rsHse,$WADbSearch1,false);
$rsHse = mysql_query($query_rsHse, $CommSimpleRegister) or die(mysql_error());
$row_rsHse = mysql_fetch_assoc($rsHse);
$totalRows_rsHse = mysql_num_rows($rsHse);