daily pastebin goal
16%
SHARE
TWEET

Untitled

a guest Feb 16th, 2012 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <select name="categoria">
  2. <?php
  3. if(isset($_GET['categoria']) && !empty($_GET['categoria'])) {
  4. $imoveis = mysql_query("SELECT * FROM imoveis GROUP BY imovelTipo");
  5. while($res_seleciona = mysql_fetch_array$imoveis)){
  6.        $tipo = $res_seleciona['imovelTipo'];
  7.        $selected = ($_GET['categoria']) == $tipo ) ? ' selected="selected"' : '';
  8.         echo '<option '. $selected.' value="'.$tipo.'">&nbsp;'.$tipo.'</option>';
  9. }
  10. }
  11.  
  12. ?>
  13.  
  14. </select>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top