Php Real Estate Script

This is the code for the featured listings...I used some of the code that seemed logical to move over to that page but there was no response whatsoever......you will see that I have changed the 1 that is the Yes in the featured field and also the code to connect to the database is at the top of the page....I get the featured listings just fine just the updates dont work!!!!
<div id="mainContent"> 
    <div id="header1"><img src="/RealEstateOnline/images/FeaturedPropertiesHeader.jpg" width="1009" height="58" /></div> 
    <div id="centerContent"> 
    <?php

foreach($_REQUEST as $key=>$value) {  
    $$key = $value;  
}

$pall = $_REQUEST['p'];
$sort = $_REQUEST['sort'];
if(!isset($_REQUEST['sort'])) {
	$sort = '1';
}

$baths1 = $_REQUEST['baths'];
$beds1 = $_REQUEST['beds'];

if(empty($_REQUEST['beds']) || $_REQUEST['beds'] == 'any') {
	$beds = 'any';
	$beds1 = '1,2,3,4,5,6,7,8,9,10';
} elseif($_REQUEST['beds'] == '5plus') {
	$beds1 = '5,6,7,8,9,10';
}

if(empty($_REQUEST['baths']) || $_REQUEST['baths'] == 'any') {
	$baths = 'any';
	$baths1 = '1,2,3,4,5,6,7,8,9,10';
} elseif($_REQUEST['baths'] == '5plus') {
	$baths1 = '5,6,7,8,9,10';
}
echo '
<form id="searchResultsForm" name="searchResultsForm" method="post" action="searchresults.php">
	<input type="hidden" name="region" value="'.$region.'" />
	<input type="hidden" name="listingType" value="'.$listingType.'" />
	<input type="hidden" name="propType" value="'.$propType.'" />
	<input type="hidden" name="minPrice" value="'.$minPrice.'" />
	<input type="hidden" name="maxPrice" value="'.$maxPrice.'" />
    <table width="100%" border="0">
        <tr>
        	<td width="65%" height="31">&nbsp;</td>
            
            <td width="17%">
				<select name="sort" class="style21" id="sort">
                    <option value="1" '.($sort=="1" ? 'selected' : '').'>Price High-Low</option>
                    <option value="2" '.($sort=="2" ? 'selected' : '').'>Price Low-High</option>
                 	</select>
            	<input type="submit" name="submit" value="Sort" />
			</td>
        </tr>
    </table> 
</form>';
 
 
if($pall != 'all') { 
        $total_pages = $_REQUEST['p']; 
        $per_page = 5; 
        $cur_page = isset($_REQUEST['p']) ? (int)$_REQUEST['p'] : 1; 
        if($sort == '2') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' ORDER BY price ASC"; 
        } elseif($sort == '1') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' ORDER BY price DESC"; 
        } 
        $result = @mysql_query($query); 
        $numrows = mysql_num_rows($result); 
        $total_pages = ceil($numrows / $per_page); 
        if ($cur_page <1 || $cur_page> $total_pages) { 
                $cur_page = 1; 
        } 
        $offset = (($cur_page - 1) * $per_page); 
        if($sort == '2') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' ORDER BY price ASC LIMIT $offset, $per_page"; 
        } elseif($sort == '1') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' ORDER BY price DESC LIMIT $offset, $per_page"; 
        } 
        $result = @mysql_query($query); 
        $total = mysql_num_rows($result); 
        $counter = 1 + (($cur_page-1)*$per_page); 
} else { 
        if($sort == '2') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' ORDER BY price ASC"; 
        } elseif($sort == '1') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' ORDER BY price DESC"; 
        } 
        $result = @mysql_query($query); 
        $numrows = mysql_num_rows($result); 
} 
 
if($numrows <= 0) {   
    echo 'No Results';   
} else {   
    while($row = mysql_fetch_array($result)) { 
         
    ?> 
      <table width="100%" border="0"> 
        <tr> 
          <td colspan="2"><div id="searchResults"> 
            <table width="100%" border="0"> 
              <tr> 
                <td width="1%" rowspan="8">&nbsp;</td> 
                <td height="17" colspan="4" class="style8"><?php echo $row['beds']; ?> bedroom <?php echo $row['propType']; ?> for <?php echo $row['listingType']; ?> in <?php echo $row['area']; ?>, <?php echo $row['region']; ?><br /> 
                  <br /></td> 
              </tr> 
              <tr> 
                <td width="36%" rowspan="7"><div align="center"><?php echo '<img src=" images/' . $row['image1'] . '" />' . PHP_EOL;  
         ?></div></td> 
                <td class="style8"><strong>Ref: </strong></td> 
                <td colspan="2" class="style8"><?php echo $row['refNum']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Location:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['area']; ?>, <?php echo $row['region']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Type:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['propType']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Price:</strong></td> 
                <td colspan="2" class="style8">&euro;<?php echo $row['price']; ?></td> 
              </tr> 
              <tr> 
                <td height="18" class="style8"><strong>Bedrooms:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['beds']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Bathrooms:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['baths']; ?></td> 
              </tr> 
              <tr> 
                <td width="13%" height="31"><span class="style26"><a href="/RealEstateOnline/propdetails.php?id=<?php echo $row['id']; ?>" class="style811">View Details </a><a href="propdetails.php"></a> <a onclick="Login_Modal_Window(0);" href="javascript:void(0);"></a></span></td> 
                <td width="27%" class="style261"><a href="javascript:void(0);" class="style811" onclick="Login_Modal_Window(0);">Save Listing</a></td> 
                <td width="23%" class="style22">Posted by <?php echo $row['postedBy']; ?></td> 
              </tr> 
            </table> 
          </div></td> 
        </tr> 
      </table> 
      <?php 
    } 
} 
if($pall != 'all') { 
        if($numrows > $per_page) { 
                echo '<br />'; 
                $page_pad = 2; 
                $min_page = max(1, $cur_page - $page_pad); 
                $max_page = min($total_pages, $cur_page + $page_pad); 
                $show_prev = $cur_page> 1 ? $cur_page - 1 : false; 
                $show_next = $cur_page <$total_pages ? $cur_page + 1 : false; 
                if ($show_prev) { 
                        echo "<a class=\"style26\" href=\"?p=1&amp;sort=$sort\">&laquo; First</a> "; 
                        echo "<a class=\"style26\" href=\"?p=$show_prev&amp;sort=$sort\">&lt; Prev</a> "; 
                } 
                for ($page = $min_page; $page <= $max_page; $page++) { 
                        if($cur_page<>$page) 
                                echo "<a class=\"style26\" href=\"?p=$page&amp;sort=$sort\">$page</a> "; 
                        else 
                                echo "<span class=\"style26\">$page </span>"; 
                } 
                if ($show_next) { 
                        echo "<a class=\"style26\" href=\"?p=$show_next&amp;sort=$sort\">Next &gt;</a> "; 
                        echo "<a class=\"style26\" href=\"?p=$total_pages&amp;sort=$sort\">Last &raquo;</a>"; 
                } 
                echo " &nbsp; <a class=\"style26\" href=\"?p=all&amp;sort=$sort\">View All</a><br />"; 
        } 
} 
?>

      <p class="style8">&nbsp;</p>
    </div>
  <div class="style8" id="leftContent"> 
      <div class="widget"> 
        <h4>Price Range</h4> 
        <form id="form2" name="form2" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        	<input type="hidden" name="region" value="<?php echo $region; ?>" />
        	<input type="hidden" name="listingType" value="<?php echo $listingType; ?>" />
        	<input type="hidden" name="propType" value="<?php echo $propType; ?>" />
        	<input type="hidden" name="beds" value="<?php echo $beds; ?>" />
        	<input type="hidden" name="baths" value="<?php echo $baths; ?>" />
          <table width="100%" border="0"> 
            <tr> 
              <td height="30" colspan="2"><select name="minPrice" class="style22" id="minPrice"> 
                <option>Minimum Price</option> 
                <option value="0" <?php echo ($minPrice=="0" ? 'selected' : ''); ?>>Any</option> 
                <option value="10000" <?php echo ($minPrice=="10000" ? 'selected' : ''); ?>>10,000</option> 
                <option value="20000" <?php echo ($minPrice=="20000" ? 'selected' : ''); ?>>20,000</option> 
                <option value="30000" <?php echo ($minPrice=="30000" ? 'selected' : ''); ?>>30,000</option> 
                <option value="40000" <?php echo ($minPrice=="40000" ? 'selected' : ''); ?>>40,000</option> 
                <option value="50000" <?php echo ($minPrice=="50000" ? 'selected' : ''); ?>>50,000</option> 
                <option value="60000" <?php echo ($minPrice=="60000" ? 'selected' : ''); ?>>60,000</option> 
                <option value="70000" <?php echo ($minPrice=="70000" ? 'selected' : ''); ?>>70,000</option> 
                <option value="80000" <?php echo ($minPrice=="80000" ? 'selected' : ''); ?>>80,000</option> 
                <option value="90000" <?php echo ($minPrice=="90000" ? 'selected' : ''); ?>>90,000</option> 
                <option value="100000" <?php echo ($minPrice=="100000" ? 'selected' : ''); ?>>100,000</option> 
                <option value="110000" <?php echo ($minPrice=="110000" ? 'selected' : ''); ?>>110,000</option> 
                <option value="120000" <?php echo ($minPrice=="120000" ? 'selected' : ''); ?>>120,000</option> 
                <option value="130000" <?php echo ($minPrice=="130000" ? 'selected' : ''); ?>>130,000</option> 
                <option value="140000" <?php echo ($minPrice=="140000" ? 'selected' : ''); ?>>140,000</option> 
                <option value="150000" <?php echo ($minPrice=="150000" ? 'selected' : ''); ?>>150,000</option> 
                <option value="160000" <?php echo ($minPrice=="160000" ? 'selected' : ''); ?>>160,000</option> 
                <option value="170000" <?php echo ($minPrice=="170000" ? 'selected' : ''); ?>>170,000</option> 
                <option value="180000" <?php echo ($minPrice=="180000" ? 'selected' : ''); ?>>180,000</option> 
                <option value="190000" <?php echo ($minPrice=="190000" ? 'selected' : ''); ?>>190,000</option> 
                <option value="200000" <?php echo ($minPrice=="200000" ? 'selected' : ''); ?>>200,000</option> 
                <option value="220000" <?php echo ($minPrice=="220000" ? 'selected' : ''); ?>>220,000</option> 
                <option value="240000" <?php echo ($minPrice=="240000" ? 'selected' : ''); ?>>240,000</option> 
                <option value="260000" <?php echo ($minPrice=="260000" ? 'selected' : ''); ?>>260,000</option> 
                <option value="280000" <?php echo ($minPrice=="280000" ? 'selected' : ''); ?>>280,000</option> 
                <option value="300000" <?php echo ($minPrice=="300000" ? 'selected' : ''); ?>>300,000</option> 
                <option value="320000" <?php echo ($minPrice=="320000" ? 'selected' : ''); ?>>320,000</option> 
                <option value="340000" <?php echo ($minPrice=="34000" ? 'selected' : ''); ?>>340,000</option> 
                <option value="360000" <?php echo ($minPrice=="360000" ? 'selected' : ''); ?>>360,000</option> 
                <option value="380000" <?php echo ($minPrice=="380000" ? 'selected' : ''); ?>>380,000</option> 
                <option value="400000" <?php echo ($minPrice=="400000" ? 'selected' : ''); ?>>400,000</option> 
                <option value="420000" <?php echo ($minPrice=="420000" ? 'selected' : ''); ?>>420,000</option> 
                <option value="440000" <?php echo ($minPrice=="440000" ? 'selected' : ''); ?>>440,000</option> 
                <option value="460000" <?php echo ($minPrice=="460000" ? 'selected' : ''); ?>>460,000</option> 
                <option value="480000" <?php echo ($minPrice=="480000" ? 'selected' : ''); ?>>480,000</option> 
                <option value="500000" <?php echo ($minPrice=="500000" ? 'selected' : ''); ?>>500,000</option> 
                <option value="550000" <?php echo ($minPrice=="550000" ? 'selected' : ''); ?>>550,000</option> 
                <option value="600000" <?php echo ($minPrice=="600000" ? 'selected' : ''); ?>>600,000</option> 
                <option value="650000" <?php echo ($minPrice=="650000" ? 'selected' : ''); ?>>650,000</option> 
                <option value="700000" <?php echo ($minPrice=="700000" ? 'selected' : ''); ?>>700,000</option> 
                <option value="750000" <?php echo ($minPrice=="750000" ? 'selected' : ''); ?>>750,000</option> 
                <option value="800000" <?php echo ($minPrice=="800000" ? 'selected' : ''); ?>>800,000</option> 
                <option value="900000" <?php echo ($minPrice=="900000" ? 'selected' : ''); ?>>900,000</option> 
                <option value="1000000" <?php echo ($minPrice=="1000000" ? 'selected' : ''); ?>>1,000,000</option> 
                <option value="1500000" <?php echo ($minPrice=="1500000" ? 'selected' : ''); ?>>1,500,000</option> 
                <option value="2000000" <?php echo ($minPrice=="2000000" ? 'selected' : ''); ?>>2,000,000</option> 
              </select></td> 
            </tr> 
            <tr> 
              <td height="30" colspan="2"><select name="maxPrice" class="style22" id="maxPrice"> 
                <option>Maximum Price</option> 
                <option value="9999999" <?php echo ($maxPrice=="9999999" ? 'selected' : ''); ?>>Any</option>
                <option value="10000" <?php echo ($maxPrice=="10000" ? 'selected' : ''); ?>>10,000</option> 
                <option value="20000" <?php echo ($maxPrice=="20000" ? 'selected' : ''); ?>>20,000</option> 
                <option value="30000" <?php echo ($maxPrice=="30000" ? 'selected' : ''); ?>>30,000</option> 
                <option value="40000" <?php echo ($maxPrice=="40000" ? 'selected' : ''); ?>>40,000</option> 
                <option value="50000" <?php echo ($maxPrice=="50000" ? 'selected' : ''); ?>>50,000</option> 
                <option value="60000" <?php echo ($maxPrice=="60000" ? 'selected' : ''); ?>>60,000</option> 
                <option value="70000" <?php echo ($maxPrice=="70000" ? 'selected' : ''); ?>>70,000</option> 
                <option value="80000" <?php echo ($maxPrice=="80000" ? 'selected' : ''); ?>>80,000</option> 
                <option value="90000" <?php echo ($maxPrice=="90000" ? 'selected' : ''); ?>>90,000</option> 
                <option value="100000" <?php echo ($maxPrice=="100000" ? 'selected' : ''); ?>>100,000</option> 
                <option value="110000" <?php echo ($maxPrice=="110000" ? 'selected' : ''); ?>>110,000</option> 
                <option value="120000" <?php echo ($maxPrice=="120000" ? 'selected' : ''); ?>>120,000</option> 
                <option value="130000" <?php echo ($maxPrice=="130000" ? 'selected' : ''); ?>>130,000</option> 
                <option value="140000" <?php echo ($maxPrice=="140000" ? 'selected' : ''); ?>>140,000</option> 
                <option value="150000" <?php echo ($maxPrice=="150000" ? 'selected' : ''); ?>>150,000</option> 
                <option value="160000" <?php echo ($maxPrice=="160000" ? 'selected' : ''); ?>>160,000</option> 
                <option value="170000" <?php echo ($maxPrice=="170000" ? 'selected' : ''); ?>>170,000</option> 
                <option value="180000" <?php echo ($maxPrice=="180000" ? 'selected' : ''); ?>>180,000</option> 
                <option value="190000" <?php echo ($maxPrice=="190000" ? 'selected' : ''); ?>>190,000</option> 
                <option value="200000" <?php echo ($maxPrice=="200000" ? 'selected' : ''); ?>>200,000</option> 
                <option value="220000" <?php echo ($maxPrice=="220000" ? 'selected' : ''); ?>>220,000</option> 
                <option value="240000" <?php echo ($maxPrice=="240000" ? 'selected' : ''); ?>>240,000</option> 
                <option value="260000" <?php echo ($maxPrice=="260000" ? 'selected' : ''); ?>>260,000</option> 
                <option value="280000" <?php echo ($maxPrice=="280000" ? 'selected' : ''); ?>>280,000</option> 
                <option value="300000" <?php echo ($maxPrice=="300000" ? 'selected' : ''); ?>>300,000</option> 
                <option value="320000" <?php echo ($maxPrice=="320000" ? 'selected' : ''); ?>>320,000</option> 
                <option value="340000" <?php echo ($maxPrice=="34000" ? 'selected' : ''); ?>>340,000</option> 
                <option value="360000" <?php echo ($maxPrice=="360000" ? 'selected' : ''); ?>>360,000</option> 
                <option value="380000" <?php echo ($maxPrice=="380000" ? 'selected' : ''); ?>>380,000</option> 
                <option value="400000" <?php echo ($maxPrice=="400000" ? 'selected' : ''); ?>>400,000</option> 
                <option value="420000" <?php echo ($maxPrice=="420000" ? 'selected' : ''); ?>>420,000</option> 
                <option value="440000" <?php echo ($maxPrice=="440000" ? 'selected' : ''); ?>>440,000</option> 
                <option value="460000" <?php echo ($maxPrice=="460000" ? 'selected' : ''); ?>>460,000</option> 
                <option value="480000" <?php echo ($maxPrice=="480000" ? 'selected' : ''); ?>>480,000</option> 
                <option value="500000" <?php echo ($maxPrice=="500000" ? 'selected' : ''); ?>>500,000</option> 
                <option value="550000" <?php echo ($maxPrice=="550000" ? 'selected' : ''); ?>>550,000</option> 
                <option value="600000" <?php echo ($maxPrice=="600000" ? 'selected' : ''); ?>>600,000</option> 
                <option value="650000" <?php echo ($maxPrice=="650000" ? 'selected' : ''); ?>>650,000</option> 
                <option value="700000" <?php echo ($maxPrice=="700000" ? 'selected' : ''); ?>>700,000</option> 
                <option value="750000" <?php echo ($maxPrice=="750000" ? 'selected' : ''); ?>>750,000</option> 
                <option value="800000" <?php echo ($maxPrice=="800000" ? 'selected' : ''); ?>>800,000</option> 
                <option value="900000" <?php echo ($maxPrice=="900000" ? 'selected' : ''); ?>>900,000</option> 
                <option value="1000000" <?php echo ($maxPrice=="1000000" ? 'selected' : ''); ?>>1,000,000</option> 
                <option value="1500000" <?php echo ($maxPrice=="1500000" ? 'selected' : ''); ?>>1,500,000</option> 
                <option value="2000000" <?php echo ($maxPrice=="2000000" ? 'selected' : ''); ?>>2,000,000</option> 
              </select></td> 
            </tr> 
            <tr> 
              <td width="55%" height="43"><input name="submit" type="submit" class="style22" id="submit" value="Update" /></td> 
              <td width="45%">&nbsp;</td> 
            </tr> 
          </table> 
        </form> 
      </div> 
      <br /> 
      <div class="widget"> 
        <h4>Other Options</h4> 
        <form id="form3" name="form3" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        	<input type="hidden" name="region" value="<?php echo $region; ?>" />
        	<input type="hidden" name="minPrice" value="<?php echo $minPrice; ?>" />
        	<input type="hidden" name="maxPrice" value="<?php echo $maxPrice; ?>" />
          <table width="100%" border="0"> 
            
            <tr> 
              <td height="30"><span class="style811"> 
                <select name="listingType" class="style22" id="listingType"> 
                  <option>Listing Type</option> 
                  <option value="'For Rent','For Sale'" <?php echo ($listingType=="'For Rent','For Sale'" ? 'selected' : ''); ?>>Any</option> 
                  <option value="'For Rent'" <?php echo ($listingType=="'For Rent'" ? 'selected' : ''); ?>>For Rent</option> 
                  <option value="'For Sale'" <?php echo ($listingType=="'For Sale'" ? 'selected' : ''); ?>>For Sale</option> 
                </select> 
              </span></td> 
            </tr>
            <tr>
              <td height="30"><span class="style811"> 
                <select name="propType" class="style22" id="propType"> 
                  <option value="">Property Type</option> 
                  <option value="'Flat','House','Shop','Office','Plot','Land','Warehouse'" <?php echo ($propType=="'Flat','House','Shop','Office','Plot','Land','Warehouse'" ? 'selected' : ''); ?>>Any</option> 
                  <option value="'Flat'" <?php echo ($propType=="'Flat'" ? 'selected' : ''); ?>>Flat</option> 
                  <option value="'House'" <?php echo ($propType=="'House'" ? 'selected' : ''); ?>>House</option> 
                  <option value="'Shop'" <?php echo ($propType=="'Shop'" ? 'selected' : ''); ?>>Shop</option> 
                  <option value="'Office'" <?php echo ($propType=="'Office'" ? 'selected' : ''); ?>>Office</option> 
                  <option value="'Plot'" <?php echo ($propType=="'Plot'" ? 'selected' : ''); ?>>Plot</option> 
                  <option value="'Land'" <?php echo ($propType=="'Land'" ? 'selected' : ''); ?>>Land</option> 
                  <option value="'Warehouse'" <?php echo ($propType=="'Warehouse'" ? 'selected' : ''); ?>>Warehouse</option> 
                </select> 
              </span></td> 
            </tr> 
            <tr> 
              <td height="30"><label> 
                <select name="beds" class="style22" id="beds"> 
                  <option>Bedrooms</option> 
                  <option value="any" <?php echo ($beds=="any" ? 'selected' : ''); ?>>Any</option> 
                  <option value="1" <?php echo ($beds=="1" ? 'selected' : ''); ?>>1</option> 
                  <option value="2" <?php echo ($beds=="2" ? 'selected' : ''); ?>>2</option> 
                  <option value="3" <?php echo ($beds=="3" ? 'selected' : ''); ?>>3</option> 
                  <option value="4" <?php echo ($beds=="4" ? 'selected' : ''); ?>>4</option> 
                  <option value="5plus" <?php echo ($beds=="5plus" ? 'selected' : ''); ?>>5+</option> 
                </select> 
              </label></td> 
            </tr> 
            <tr> 
              <td height="30"><select name="baths" class="style22" id="baths"> 
                <option>Bathrooms</option> 
                  <option value="any" <?php echo ($baths=="any" ? 'selected' : ''); ?>>Any</option> 
                  <option value="1" <?php echo ($baths=="1" ? 'selected' : ''); ?>>1</option> 
                  <option value="2" <?php echo ($baths=="2" ? 'selected' : ''); ?>>2</option> 
                  <option value="3" <?php echo ($baths=="3" ? 'selected' : ''); ?>>3</option> 
                  <option value="4" <?php echo ($baths=="4" ? 'selected' : ''); ?>>4</option> 
                  <option value="5plus" <?php echo ($baths=="5plus" ? 'selected' : ''); ?>>5+</option> 
              </select></td> 
            </tr> 
            <tr> 
              <td height="40"><input name="submit" type="submit" class="style211" id="submit" value="Update" /></td> 
            </tr> 
            <tr> 
              <td>&nbsp;</td> 
            </tr> 
          </table> 
        </form>

Open in new window

dino_angelidesAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

kumaranmcaCommented:
Hi Dino,

Kindly the below query execute in your phpmyadmin. Then how many results are come.
SELECT * FROM listings WHERE featured = 'Yes'

no results you got...change set some property featured='Yes' manually. then execute the query.. to optimize in your php code...

Refer the site...real estate...its helpful

http://phoenixurbanliving360.com/ 
0
john-formbyCommented:
Hi,

The reason it is not updating is because you need to modify your queries.  At the moment, when you are submitting, it is running the query again and filtering on just featured = yes.  You need to have the query built to filter on all the possible options.  This means that extra code is required in the beginning because if any of the options are empty, you need to populate a default value for the query to work.  Also, when you are doing the sort order, the values need to be passed in hidden fields to the query.

I have updated your code.  Please have a look and let me know.

Hope this helps,

John
<div id="mainContent"> 
    <div id="header1"><img src="/RealEstateOnline/images/FeaturedPropertiesHeader.jpg" width="1009" height="58" /></div> 
    <div id="centerContent"> 
    <?php

$dbHost = "localhost";
$dbUser = "YOUR_USERNAME";
$dbPass = "YOUR_PASSWORD";
$dbName = "YOUR_DATABASE";
$db = mysql_connect($dbHost,$dbUser,$dbPass);
mysql_select_db($dbName,$db);

foreach($_REQUEST as $key=>$value) {  
    $$key = $value;  
}

$pall = $_REQUEST['p'];
$sort = $_REQUEST['sort'];
if(!isset($_REQUEST['sort'])) {
	$sort = '1';
}

$baths1 = $_REQUEST['baths'];
$beds1 = $_REQUEST['beds'];

if(empty($_REQUEST['beds']) || $_REQUEST['beds'] == 'any') {
	$beds = 'any';
	$beds1 = '1,2,3,4,5,6,7,8,9,10';
} elseif($_REQUEST['beds'] == '5plus') {
	$beds1 = '5,6,7,8,9,10';
}

if(empty($_REQUEST['baths']) || $_REQUEST['baths'] == 'any') {
	$baths = 'any';
	$baths1 = '1,2,3,4,5,6,7,8,9,10';
} elseif($_REQUEST['baths'] == '5plus') {
	$baths1 = '5,6,7,8,9,10';
}
if(empty($_REQUEST['minPrice'])) {
	$minPrice = '0';
}
if(empty($_REQUEST['maxPrice'])) {
	$maxPrice = '9999999';
}
if(empty($_REQUEST['listingType'])) {
	$listingType = "'For Rent','For Sale'";
}
if(empty($_REQUEST['propType'])) {
	$propType = "'Flat','House','Shop','Office','Plot','Land','Warehouse'";
}
echo '
<form id="searchResultsForm" name="searchResultsForm" method="post" action="featured.php">
	<input type="hidden" name="listingType" value="'.$listingType.'" />
	<input type="hidden" name="propType" value="'.$propType.'" />
	<input type="hidden" name="minPrice" value="'.$minPrice.'" />
	<input type="hidden" name="maxPrice" value="'.$maxPrice.'" />
	<input type="hidden" name="beds" value="'.$beds.'" />
	<input type="hidden" name="baths" value="'.$baths.'" />
    <table width="100%" border="0">
        <tr>
        	<td width="65%" height="31">&nbsp;</td>
            
            <td width="17%">
				<select name="sort" class="style21" id="sort">
                    <option value="1" '.($sort=="1" ? 'selected' : '').'>Price High-Low</option>
                    <option value="2" '.($sort=="2" ? 'selected' : '').'>Price Low-High</option>
                 	</select>
            	<input type="submit" name="submit" value="Sort" />
			</td>
        </tr>
    </table> 
</form>';
 
 
if($pall != 'all') { 
        $total_pages = $_REQUEST['p']; 
        $per_page = 5; 
        $cur_page = isset($_REQUEST['p']) ? (int)$_REQUEST['p'] : 1; 
        if($sort == '2') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' AND price BETWEEN $minPrice AND $maxPrice AND listingType IN($listingType)  AND propType IN($propType) AND beds IN($beds1) AND baths IN($baths1) ORDER BY price ASC";
        } elseif($sort == '1') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' AND price BETWEEN $minPrice AND $maxPrice AND listingType IN($listingType) AND propType IN($propType) AND beds IN($beds1) AND baths IN($baths1) ORDER BY price DESC"; 
        } 
        $result = @mysql_query($query); 
        $numrows = mysql_num_rows($result); 
        $total_pages = ceil($numrows / $per_page); 
        if ($cur_page <1 || $cur_page> $total_pages) { 
                $cur_page = 1; 
        } 
        $offset = (($cur_page - 1) * $per_page); 
        if($sort == '2') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' AND price BETWEEN $minPrice AND $maxPrice AND listingType IN($listingType) AND propType IN($propType) AND beds IN($beds1) AND baths IN($baths1) ORDER BY price ASC LIMIT $offset, $per_page"; 
        } elseif($sort == '1') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' AND price BETWEEN $minPrice AND $maxPrice AND listingType IN($listingType) AND propType IN($propType) AND beds IN($beds1) AND baths IN($baths1) ORDER BY price DESC LIMIT $offset, $per_page"; 
        } 
        $result = @mysql_query($query); 
        $total = mysql_num_rows($result); 
        $counter = 1 + (($cur_page-1)*$per_page); 
} else { 
        if($sort == '2') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' AND price BETWEEN $minPrice AND $maxPrice AND listingType IN($listingType) AND propType IN($propType) AND beds IN($beds1) AND baths IN($baths1) ORDER BY price ASC"; 
        } elseif($sort == '1') { 
            $query = "SELECT * FROM listings WHERE featured = 'Yes' AND price BETWEEN $minPrice AND $maxPrice AND listingType IN($listingType) AND propType IN($propType) AND beds IN($beds1) AND baths IN($baths1) ORDER BY price DESC"; 
        } 
        $result = @mysql_query($query); 
        $numrows = mysql_num_rows($result); 
} 
 
if($numrows <= 0) {   
    echo 'No Results';   
} else {   
    while($row = mysql_fetch_array($result)) { 
         
    ?> 
      <table width="100%" border="0"> 
        <tr> 
          <td colspan="2"><div id="searchResults"> 
            <table width="100%" border="0"> 
              <tr> 
                <td width="1%" rowspan="8">&nbsp;</td> 
                <td height="17" colspan="4" class="style8"><?php echo $row['beds']; ?> bedroom <?php echo $row['propType']; ?> for <?php echo $row['listingType']; ?> in <?php echo $row['area']; ?>, <?php echo $row['region']; ?><br /> 
                  <br /></td> 
              </tr> 
              <tr> 
                <td width="36%" rowspan="7"><div align="center"><?php echo '<img src=" images/' . $row['image1'] . '" />' . PHP_EOL;  
         ?></div></td> 
                <td class="style8"><strong>Ref: </strong></td> 
                <td colspan="2" class="style8"><?php echo $row['refNum']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Location:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['area']; ?>, <?php echo $row['region']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Type:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['propType']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Price:</strong></td> 
                <td colspan="2" class="style8">&euro;<?php echo $row['price']; ?></td> 
              </tr> 
              <tr> 
                <td height="18" class="style8"><strong>Bedrooms:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['beds']; ?></td> 
              </tr> 
              <tr> 
                <td class="style8"><strong>Bathrooms:</strong></td> 
                <td colspan="2" class="style8"><?php echo $row['baths']; ?></td> 
              </tr> 
              <tr> 
                <td width="13%" height="31"><span class="style26"><a href="/RealEstateOnline/propdetails.php?id=<?php echo $row['id']; ?>" class="style811">View Details </a><a href="propdetails.php"></a> <a onclick="Login_Modal_Window(0);" href="javascript:void(0);"></a></span></td> 
                <td width="27%" class="style261"><a href="javascript:void(0);" class="style811" onclick="Login_Modal_Window(0);">Save Listing</a></td> 
                <td width="23%" class="style22">Posted by <?php echo $row['postedBy']; ?></td> 
              </tr> 
            </table> 
          </div></td> 
        </tr> 
      </table> 
      <?php 
    } 
} 
if($pall != 'all') { 
        if($numrows > $per_page) { 
                echo '<br />'; 
                $page_pad = 2; 
                $min_page = max(1, $cur_page - $page_pad); 
                $max_page = min($total_pages, $cur_page + $page_pad); 
                $show_prev = $cur_page> 1 ? $cur_page - 1 : false; 
                $show_next = $cur_page <$total_pages ? $cur_page + 1 : false; 
                if ($show_prev) { 
                        echo "<a class=\"style26\" href=\"?p=1&amp;sort=$sort\">&laquo; First</a> "; 
                        echo "<a class=\"style26\" href=\"?p=$show_prev&amp;sort=$sort\">&lt; Prev</a> "; 
                } 
                for ($page = $min_page; $page <= $max_page; $page++) { 
                        if($cur_page<>$page) 
                                echo "<a class=\"style26\" href=\"?p=$page&amp;sort=$sort\">$page</a> "; 
                        else 
                                echo "<span class=\"style26\">$page </span>"; 
                } 
                if ($show_next) { 
                        echo "<a class=\"style26\" href=\"?p=$show_next&amp;sort=$sort\">Next &gt;</a> "; 
                        echo "<a class=\"style26\" href=\"?p=$total_pages&amp;sort=$sort\">Last &raquo;</a>"; 
                } 
                echo " &nbsp; <a class=\"style26\" href=\"?p=all&amp;sort=$sort\">View All</a><br />"; 
        } 
} 
?>

      <p class="style8">&nbsp;</p>
    </div>
  <div class="style8" id="leftContent"> 
      <div class="widget"> 
        <h4>Price Range</h4> 
        <form id="form2" name="form2" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        	<input type="hidden" name="listingType" value="<?php echo $listingType; ?>" />
        	<input type="hidden" name="propType" value="<?php echo $propType; ?>" />
        	<input type="hidden" name="beds" value="<?php echo $beds; ?>" />
        	<input type="hidden" name="baths" value="<?php echo $baths; ?>" />
          <table width="100%" border="0"> 
            <tr> 
              <td height="30" colspan="2"><select name="minPrice" class="style22" id="minPrice"> 
                <option>Minimum Price</option> 
                <option value="0" <?php echo ($minPrice=="0" ? 'selected' : ''); ?>>Any</option> 
                <option value="10000" <?php echo ($minPrice=="10000" ? 'selected' : ''); ?>>10,000</option> 
                <option value="20000" <?php echo ($minPrice=="20000" ? 'selected' : ''); ?>>20,000</option> 
                <option value="30000" <?php echo ($minPrice=="30000" ? 'selected' : ''); ?>>30,000</option> 
                <option value="40000" <?php echo ($minPrice=="40000" ? 'selected' : ''); ?>>40,000</option> 
                <option value="50000" <?php echo ($minPrice=="50000" ? 'selected' : ''); ?>>50,000</option> 
                <option value="60000" <?php echo ($minPrice=="60000" ? 'selected' : ''); ?>>60,000</option> 
                <option value="70000" <?php echo ($minPrice=="70000" ? 'selected' : ''); ?>>70,000</option> 
                <option value="80000" <?php echo ($minPrice=="80000" ? 'selected' : ''); ?>>80,000</option> 
                <option value="90000" <?php echo ($minPrice=="90000" ? 'selected' : ''); ?>>90,000</option> 
                <option value="100000" <?php echo ($minPrice=="100000" ? 'selected' : ''); ?>>100,000</option> 
                <option value="110000" <?php echo ($minPrice=="110000" ? 'selected' : ''); ?>>110,000</option> 
                <option value="120000" <?php echo ($minPrice=="120000" ? 'selected' : ''); ?>>120,000</option> 
                <option value="130000" <?php echo ($minPrice=="130000" ? 'selected' : ''); ?>>130,000</option> 
                <option value="140000" <?php echo ($minPrice=="140000" ? 'selected' : ''); ?>>140,000</option> 
                <option value="150000" <?php echo ($minPrice=="150000" ? 'selected' : ''); ?>>150,000</option> 
                <option value="160000" <?php echo ($minPrice=="160000" ? 'selected' : ''); ?>>160,000</option> 
                <option value="170000" <?php echo ($minPrice=="170000" ? 'selected' : ''); ?>>170,000</option> 
                <option value="180000" <?php echo ($minPrice=="180000" ? 'selected' : ''); ?>>180,000</option> 
                <option value="190000" <?php echo ($minPrice=="190000" ? 'selected' : ''); ?>>190,000</option> 
                <option value="200000" <?php echo ($minPrice=="200000" ? 'selected' : ''); ?>>200,000</option> 
                <option value="220000" <?php echo ($minPrice=="220000" ? 'selected' : ''); ?>>220,000</option> 
                <option value="240000" <?php echo ($minPrice=="240000" ? 'selected' : ''); ?>>240,000</option> 
                <option value="260000" <?php echo ($minPrice=="260000" ? 'selected' : ''); ?>>260,000</option> 
                <option value="280000" <?php echo ($minPrice=="280000" ? 'selected' : ''); ?>>280,000</option> 
                <option value="300000" <?php echo ($minPrice=="300000" ? 'selected' : ''); ?>>300,000</option> 
                <option value="320000" <?php echo ($minPrice=="320000" ? 'selected' : ''); ?>>320,000</option> 
                <option value="340000" <?php echo ($minPrice=="34000" ? 'selected' : ''); ?>>340,000</option> 
                <option value="360000" <?php echo ($minPrice=="360000" ? 'selected' : ''); ?>>360,000</option> 
                <option value="380000" <?php echo ($minPrice=="380000" ? 'selected' : ''); ?>>380,000</option> 
                <option value="400000" <?php echo ($minPrice=="400000" ? 'selected' : ''); ?>>400,000</option> 
                <option value="420000" <?php echo ($minPrice=="420000" ? 'selected' : ''); ?>>420,000</option> 
                <option value="440000" <?php echo ($minPrice=="440000" ? 'selected' : ''); ?>>440,000</option> 
                <option value="460000" <?php echo ($minPrice=="460000" ? 'selected' : ''); ?>>460,000</option> 
                <option value="480000" <?php echo ($minPrice=="480000" ? 'selected' : ''); ?>>480,000</option> 
                <option value="500000" <?php echo ($minPrice=="500000" ? 'selected' : ''); ?>>500,000</option> 
                <option value="550000" <?php echo ($minPrice=="550000" ? 'selected' : ''); ?>>550,000</option> 
                <option value="600000" <?php echo ($minPrice=="600000" ? 'selected' : ''); ?>>600,000</option> 
                <option value="650000" <?php echo ($minPrice=="650000" ? 'selected' : ''); ?>>650,000</option> 
                <option value="700000" <?php echo ($minPrice=="700000" ? 'selected' : ''); ?>>700,000</option> 
                <option value="750000" <?php echo ($minPrice=="750000" ? 'selected' : ''); ?>>750,000</option> 
                <option value="800000" <?php echo ($minPrice=="800000" ? 'selected' : ''); ?>>800,000</option> 
                <option value="900000" <?php echo ($minPrice=="900000" ? 'selected' : ''); ?>>900,000</option> 
                <option value="1000000" <?php echo ($minPrice=="1000000" ? 'selected' : ''); ?>>1,000,000</option> 
                <option value="1500000" <?php echo ($minPrice=="1500000" ? 'selected' : ''); ?>>1,500,000</option> 
                <option value="2000000" <?php echo ($minPrice=="2000000" ? 'selected' : ''); ?>>2,000,000</option> 
              </select></td> 
            </tr> 
            <tr> 
              <td height="30" colspan="2"><select name="maxPrice" class="style22" id="maxPrice"> 
                <option>Maximum Price</option> 
                <option value="9999999" <?php echo ($maxPrice=="9999999" ? 'selected' : ''); ?>>Any</option>
                <option value="10000" <?php echo ($maxPrice=="10000" ? 'selected' : ''); ?>>10,000</option> 
                <option value="20000" <?php echo ($maxPrice=="20000" ? 'selected' : ''); ?>>20,000</option> 
                <option value="30000" <?php echo ($maxPrice=="30000" ? 'selected' : ''); ?>>30,000</option> 
                <option value="40000" <?php echo ($maxPrice=="40000" ? 'selected' : ''); ?>>40,000</option> 
                <option value="50000" <?php echo ($maxPrice=="50000" ? 'selected' : ''); ?>>50,000</option> 
                <option value="60000" <?php echo ($maxPrice=="60000" ? 'selected' : ''); ?>>60,000</option> 
                <option value="70000" <?php echo ($maxPrice=="70000" ? 'selected' : ''); ?>>70,000</option> 
                <option value="80000" <?php echo ($maxPrice=="80000" ? 'selected' : ''); ?>>80,000</option> 
                <option value="90000" <?php echo ($maxPrice=="90000" ? 'selected' : ''); ?>>90,000</option> 
                <option value="100000" <?php echo ($maxPrice=="100000" ? 'selected' : ''); ?>>100,000</option> 
                <option value="110000" <?php echo ($maxPrice=="110000" ? 'selected' : ''); ?>>110,000</option> 
                <option value="120000" <?php echo ($maxPrice=="120000" ? 'selected' : ''); ?>>120,000</option> 
                <option value="130000" <?php echo ($maxPrice=="130000" ? 'selected' : ''); ?>>130,000</option> 
                <option value="140000" <?php echo ($maxPrice=="140000" ? 'selected' : ''); ?>>140,000</option> 
                <option value="150000" <?php echo ($maxPrice=="150000" ? 'selected' : ''); ?>>150,000</option> 
                <option value="160000" <?php echo ($maxPrice=="160000" ? 'selected' : ''); ?>>160,000</option> 
                <option value="170000" <?php echo ($maxPrice=="170000" ? 'selected' : ''); ?>>170,000</option> 
                <option value="180000" <?php echo ($maxPrice=="180000" ? 'selected' : ''); ?>>180,000</option> 
                <option value="190000" <?php echo ($maxPrice=="190000" ? 'selected' : ''); ?>>190,000</option> 
                <option value="200000" <?php echo ($maxPrice=="200000" ? 'selected' : ''); ?>>200,000</option> 
                <option value="220000" <?php echo ($maxPrice=="220000" ? 'selected' : ''); ?>>220,000</option> 
                <option value="240000" <?php echo ($maxPrice=="240000" ? 'selected' : ''); ?>>240,000</option> 
                <option value="260000" <?php echo ($maxPrice=="260000" ? 'selected' : ''); ?>>260,000</option> 
                <option value="280000" <?php echo ($maxPrice=="280000" ? 'selected' : ''); ?>>280,000</option> 
                <option value="300000" <?php echo ($maxPrice=="300000" ? 'selected' : ''); ?>>300,000</option> 
                <option value="320000" <?php echo ($maxPrice=="320000" ? 'selected' : ''); ?>>320,000</option> 
                <option value="340000" <?php echo ($maxPrice=="34000" ? 'selected' : ''); ?>>340,000</option> 
                <option value="360000" <?php echo ($maxPrice=="360000" ? 'selected' : ''); ?>>360,000</option> 
                <option value="380000" <?php echo ($maxPrice=="380000" ? 'selected' : ''); ?>>380,000</option> 
                <option value="400000" <?php echo ($maxPrice=="400000" ? 'selected' : ''); ?>>400,000</option> 
                <option value="420000" <?php echo ($maxPrice=="420000" ? 'selected' : ''); ?>>420,000</option> 
                <option value="440000" <?php echo ($maxPrice=="440000" ? 'selected' : ''); ?>>440,000</option> 
                <option value="460000" <?php echo ($maxPrice=="460000" ? 'selected' : ''); ?>>460,000</option> 
                <option value="480000" <?php echo ($maxPrice=="480000" ? 'selected' : ''); ?>>480,000</option> 
                <option value="500000" <?php echo ($maxPrice=="500000" ? 'selected' : ''); ?>>500,000</option> 
                <option value="550000" <?php echo ($maxPrice=="550000" ? 'selected' : ''); ?>>550,000</option> 
                <option value="600000" <?php echo ($maxPrice=="600000" ? 'selected' : ''); ?>>600,000</option> 
                <option value="650000" <?php echo ($maxPrice=="650000" ? 'selected' : ''); ?>>650,000</option> 
                <option value="700000" <?php echo ($maxPrice=="700000" ? 'selected' : ''); ?>>700,000</option> 
                <option value="750000" <?php echo ($maxPrice=="750000" ? 'selected' : ''); ?>>750,000</option> 
                <option value="800000" <?php echo ($maxPrice=="800000" ? 'selected' : ''); ?>>800,000</option> 
                <option value="900000" <?php echo ($maxPrice=="900000" ? 'selected' : ''); ?>>900,000</option> 
                <option value="1000000" <?php echo ($maxPrice=="1000000" ? 'selected' : ''); ?>>1,000,000</option> 
                <option value="1500000" <?php echo ($maxPrice=="1500000" ? 'selected' : ''); ?>>1,500,000</option> 
                <option value="2000000" <?php echo ($maxPrice=="2000000" ? 'selected' : ''); ?>>2,000,000</option> 
              </select></td> 
            </tr> 
            <tr> 
              <td width="55%" height="43"><input name="submit" type="submit" class="style22" id="submit" value="Update" /></td> 
              <td width="45%">&nbsp;</td> 
            </tr> 
          </table> 
        </form> 
      </div> 
      <br /> 
      <div class="widget"> 
        <h4>Other Options</h4> 
        <form id="form3" name="form3" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
        	<input type="hidden" name="minPrice" value="<?php echo $minPrice; ?>" />
        	<input type="hidden" name="maxPrice" value="<?php echo $maxPrice; ?>" />
          <table width="100%" border="0"> 
            
            <tr> 
              <td height="30"><span class="style811"> 
                <select name="listingType" class="style22" id="listingType"> 
                  <option>Listing Type</option> 
                  <option value="'For Rent','For Sale'" <?php echo ($listingType=="'For Rent','For Sale'" ? 'selected' : ''); ?>>Any</option> 
                  <option value="'For Rent'" <?php echo ($listingType=="'For Rent'" ? 'selected' : ''); ?>>For Rent</option> 
                  <option value="'For Sale'" <?php echo ($listingType=="'For Sale'" ? 'selected' : ''); ?>>For Sale</option> 
                </select> 
              </span></td> 
            </tr>
            <tr>
              <td height="30"><span class="style811"> 
                <select name="propType" class="style22" id="propType"> 
                  <option value="">Property Type</option> 
                  <option value="'Flat','House','Shop','Office','Plot','Land','Warehouse'" <?php echo ($propType=="'Flat','House','Shop','Office','Plot','Land','Warehouse'" ? 'selected' : ''); ?>>Any</option> 
                  <option value="'Flat'" <?php echo ($propType=="'Flat'" ? 'selected' : ''); ?>>Flat</option> 
                  <option value="'House'" <?php echo ($propType=="'House'" ? 'selected' : ''); ?>>House</option> 
                  <option value="'Shop'" <?php echo ($propType=="'Shop'" ? 'selected' : ''); ?>>Shop</option> 
                  <option value="'Office'" <?php echo ($propType=="'Office'" ? 'selected' : ''); ?>>Office</option> 
                  <option value="'Plot'" <?php echo ($propType=="'Plot'" ? 'selected' : ''); ?>>Plot</option> 
                  <option value="'Land'" <?php echo ($propType=="'Land'" ? 'selected' : ''); ?>>Land</option> 
                  <option value="'Warehouse'" <?php echo ($propType=="'Warehouse'" ? 'selected' : ''); ?>>Warehouse</option> 
                </select> 
              </span></td> 
            </tr> 
            <tr> 
              <td height="30"><label> 
                <select name="beds" class="style22" id="beds"> 
                  <option>Bedrooms</option> 
                  <option value="any" <?php echo ($beds=="any" ? 'selected' : ''); ?>>Any</option> 
                  <option value="1" <?php echo ($beds=="1" ? 'selected' : ''); ?>>1</option> 
                  <option value="2" <?php echo ($beds=="2" ? 'selected' : ''); ?>>2</option> 
                  <option value="3" <?php echo ($beds=="3" ? 'selected' : ''); ?>>3</option> 
                  <option value="4" <?php echo ($beds=="4" ? 'selected' : ''); ?>>4</option> 
                  <option value="5plus" <?php echo ($beds=="5plus" ? 'selected' : ''); ?>>5+</option> 
                </select> 
              </label></td> 
            </tr> 
            <tr> 
              <td height="30"><select name="baths" class="style22" id="baths"> 
                <option>Bathrooms</option> 
                  <option value="any" <?php echo ($baths=="any" ? 'selected' : ''); ?>>Any</option> 
                  <option value="1" <?php echo ($baths=="1" ? 'selected' : ''); ?>>1</option> 
                  <option value="2" <?php echo ($baths=="2" ? 'selected' : ''); ?>>2</option> 
                  <option value="3" <?php echo ($baths=="3" ? 'selected' : ''); ?>>3</option> 
                  <option value="4" <?php echo ($baths=="4" ? 'selected' : ''); ?>>4</option> 
                  <option value="5plus" <?php echo ($baths=="5plus" ? 'selected' : ''); ?>>5+</option> 
              </select></td> 
            </tr> 
            <tr> 
              <td height="40"><input name="submit" type="submit" class="style211" id="submit" value="Update" /></td> 
            </tr> 
            <tr> 
              <td>&nbsp;</td> 
            </tr> 
          </table> 
        </form>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dino_angelidesAuthor Commented:
Hi John, yes i saw what you meant......:) thank you it works!!!! coming up with a new question soon!!!
0
john-formbyCommented:
No problem :-)  Did you see the comment posted on your other question: http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_25588521.html
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.