<?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";

	$b = $_GET['b'];


  $sqlc = mysql_query("SELECT * FROM empresas WHERE id_bairro = '$b' ORDER BY empresa asc");
?>
            
           <select id='empresas' name='empresas' class="form-control">
             <option>- Empresas -</option>

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