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

	$id_uf = $_GET['uf'];

	if(isset($_GET['c'])){ $c = $_GET['c']; } else { $c='444444444444444444444440';}

  $sqlc = mysql_query("SELECT * FROM l_cidades WHERE id_uf = '$id_uf' ORDER BY cidade asc");
?>
            
           <select id='cidades' class="form-control">
             <option>- Cidades -</option>

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