<?php
session_start();
if(strpos(strtolower($_SERVER['REQUEST_URI']), 'phpsessid') !== false)
{
  session_destroy();
  session_regenerate_id();
  session_start();
                              
}
include "../phpconfig/config.php";
include "../phpconfig/valida_login.php";
include "../phpconfig/slugfy.php";

	$c = $_GET['c'];


  $sqlc = mysql_query("SELECT * FROM l_bairros WHERE id_cidade = '$c' ORDER BY bairro asc");
?>
            
           <select id='bairros' name='cidades' class="form-control">
             <option>- Bairros -</option>

                <?php while($lin = mysql_fetch_assoc($sqlc)){ ?>                
                  <option value='<?php  echo $lin['id'];  ?>' ><?php  echo $lin['bairro'];  ?></option>
                <?php } ?>   
                </select>