Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <select name="categoria">
- <?php
- if(isset($_GET['categoria']) && !empty($_GET['categoria'])) {
- $imoveis = mysql_query("SELECT * FROM imoveis GROUP BY imovelTipo");
- while($res_seleciona = mysql_fetch_array$imoveis)){
- $tipo = $res_seleciona['imovelTipo'];
- $selected = ($_GET['categoria']) == $tipo ) ? ' selected="selected"' : '';
- echo '<option '. $selected.' value="'.$tipo.'"> '.$tipo.'</option>';
- }
- }
- ?>
- </select>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement