move the code for the recordset that is at lines 86 - 139:
<?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;
}
}
?>
<?php
$maxRows_WADAproperties = 10;
$pageNum_WADAproperties = 0;
if (isset($_GET['pageNum_WADAproperties'])) {
$pageNum_WADAproperties = $_GET['pageNum_WADAproperties'];
}
$startRow_WADAproperties = $pageNum_WADAproperties * $maxRows_WADAproperties;
mysql_select_db($database_con_silbert, $con_silbert);
$query_WADAproperties = "SELECT id, prop_name, prop_county, prop_status, featured FROM properties ORDER BY prop_name DESC";
$query_limit_WADAproperties = sprintf("%s LIMIT %d, %d", $query_WADAproperties, $startRow_WADAproperties, $maxRows_WADAproperties);
$WADAproperties = mysql_query($query_limit_WADAproperties, $con_silbert) or die(mysql_error());
$row_WADAproperties = mysql_fetch_assoc($WADAproperties);
if (isset($_GET['totalRows_WADAproperties'])) {
$totalRows_WADAproperties = $_GET['totalRows_WADAproperties'];
} else {
$all_WADAproperties = mysql_query($query_WADAproperties, $con_silbert);
$totalRows_WADAproperties = mysql_num_rows($all_WADAproperties);
}
$totalPages_WADAproperties = ceil($totalRows_WADAproperties/$maxRows_WADAproperties)-1;
?>
to line 4.