Hi again,
Ok I have attempted

the code you sent above, and I also couldn't get it to work. Now, I am getting all the results showing on the first page, a next link that doesn't work and it says, " showing 1 of listings"
//set rows per page, page to display and rows to display that correspond to that page
$rows_per_page = 3;
if(!isset($_GET['page'])){
$page;
} else {
$page = $_GET['page'];
}
$start = $page * $rows_per_page;
$end = ($page+1) * $rows_per_page;
//make sure we dont display more than whats available
if ($end > $row_count)
$end = $row_count;
//determine number of rows from search result
if (isset($_GET['row_count'])) {
$row_count = $_GET['row_count'];
} else {
$all = mysql_query($sql);
$row_count = @mysql_num_rows($all);
}
$page_count = ceil($row_count/$rows_per_page)-1;
## Start building sql for GET varables for advanced search
//Add Price From
if(isset($_REQUEST['pfrom']) && ($_REQUEST['pfrom'] != '-1'))
$search[] = ' price >= '.$_REQUEST['pfrom'];
//Add Max Price
if(isset($_REQUEST['pto']) && ($_REQUEST['pto'] != '-1'))
$search[] = ' price <= '.$_REQUEST['pto'];
//Add Property Type
if(isset($_REQUEST['category']) && ($_REQUEST['category'] != ''))
$search[] = ' cid = '.$_REQUEST['category'];
//Add Property Style Type
if(isset($_REQUEST['style']) && ($_REQUEST['style'] != ''))
$search[] = ' styleID = '.$_REQUEST['style'];
//Add Min Bed
if(isset($_REQUEST['bed']) && ($_REQUEST['bed'] != ''))
$search[] =' bed >= "'.$_REQUEST['bed'].'"';
//Add Min Bath
if(isset($_REQUEST['bath']) && ($_REQUEST['bath'] != ''))
$search[] = ' bath >= "'.$_REQUEST['bath'].'"';
//Add city
if(isset($_REQUEST['city']) && ($_REQUEST['city'] != ''))
$search[] = ' city = "'.$_REQUEST['city'].'"';
//Add State
if(isset($_REQUEST['state']) && ($_REQUEST['state'] != ''))
$search[] = ' state = "'.$_REQUEST['state'].'"';
//Add min square feet
if(isset($_REQUEST['sqft']) && ($_REQUEST['sqft'] != ''))
$search[] = ' sqft >= '.$_REQUEST['sqft'];
//Add Garage
if(isset($_REQUEST['garage']) && ($_REQUEST['garage'] != ''))
$search[] = ' garage = "'.$_REQUEST['garage'].'"';
//Add lot size
if(isset($_REQUEST['lot_size']) && ($_REQUEST['lot_size'] != ''))
$search[] = ' lot_size >= '.$_REQUEST['lot_size'];
//implode to search string on ' and ';
$searchStr = @implode(' and ',$search);
$sql = 'select * FROM items WHERE (expires > NOW()) and active = "Yes" and ';
$sql .= $searchStr;
### DEBUG
if($debugP) echo 'Advanced Search Sql<hr>'.$sql;
$error['Results'] = 'No results found, please search again';
//Perform search
$searchResults = $mysql->exSql($sql);
### BUILD OUTPUT ####
//display the rows for the specified page
for ($i=$start; $i<$end; $i++)
{
echo "Row: ".$i;
}
//out put the links to all available pages
for ($j=1; $j<=$page_count; $j++)
echo "Page ".$j." link";
// Build Page Number Hyperlinks
echo "<center>Select a Page<br />";
// Build Previous Link
if($page > 1){
$prev = ($page - 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page=$prev\"><<Previous</a> ";
}
for ($j=1; $j<=$page_count; $j++){
if(($page_count) == $j){
echo "$j ";
} else {
echo "<a href=\"".$_SERVER['PHP_SELF']."?pageNum_p=$j\">$j</a> ";
}
}
// Build Next Link
if($page < $page_count){
$next = ($page_count + 1);
echo "<a href=\"".$_SERVER['PHP_SELF']."?page_count=$next\".>Next>></a>";
}
echo "</center>";
?>
<div align="left" class="locText"><a href="index.php" class="locLink">Home</a> <span class="locArrow"> > </span> Search Results</div>
<hr size="1" color="#666666">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="pageText" >Showing: <strong><?php echo ($start + 1) ?> to <?php echo min($start + $rows_per_page, $row_count) ?> of <?php echo $row_count ?></strong> Listings</td>
<td align="right" class="pageText"></td>
</tr>
</table></td>
</tr>
<tr>
<td height="5"><img src="images/pixel.gif" width="1" height="1" alt=""></td>
</tr>
<tr>
<td><table width="100%" border="0" cellspacing="1" cellpadding="4" class="resBorder">
<tr>
<td class="colText">City</td>
<td class="colText">ST</td>
<td class="colText">Price</td>
<td class="colText">Beds</td>
<td class="colText">Baths</td>
<td class="colText">Sqft</td>
</tr>
<? while($row_p = @mysql_fetch_assoc($searchResults)) { ?>
<tr valign="top">
<td class="rowText"><? echo $row_p['city']; ?></td>
<td class="rowText"><? echo $row_p['state']; ?></td>
<td class="rowText"><? echo Money($row_p['price'],1); ?></td>
<td class="rowText"><? echo $row_p['bed']; ?></td>
<td class="rowText"><? echo $row_p['bath']; ?></td>
<td class="rowText"><? echo $row_p['sqft']; ?></td>
</tr>
<tr valign="top">
<td class="descText" colspan="8"><table border="0" cellspacing="0" cellpadding="4">
<tr valign="top">
<? //fetch photo from database
$sql = "select * from photos where ptid = ". $row_p['id']." and porder = '1' ";
//echo $sql; //debug sql output
$pRS = mysql_query($sql,$myconn) or die(mysql_error());
//fetch assoc array
$row_photo = mysql_fetch_assoc($pRS);
// if image exist
if ( mysql_num_rows($pRS) > 0 )
$imageSRC = $row_photo['location'];
else //no photo
$imageSRC = "noimage.jpg";
?>
<td class="descText"><a href="detail.php?id=<? echo $row_p['id']; ?>"><img src="admin/photos/uploads/small_thumbs/tn_<? echo $imageSRC; ?>" border="0" alt="<? echo $row_photo['caption']; ?>"></a></td>
<td class="descText"><? echo substr($row_p['description'],0,150); ?>...<a href="detail.php?id=<? echo $row_p['id']; ?>" class="rowLink">more..</a><a class="rowLink" href="saveListing.php?id=<? echo $row_p['id']; ?>" title="Click to save listing"><br>
save listing</a></td>
</tr>
</table></td>
</tr>
<? } ?>