'; } else { echo ''; } $cep = preg_replace("/[^0-9]/", "", $_GET["cep"]); $id = preg_replace("/[^0-9]/", "", $_GET["id"]); $query = mysql_query("select * from busca_end where cep = '".$cep."'") or die(mysql_error()); while($linha = mysql_fetch_array($query)){ $lat = $linha["lat"]; $lon = $linha["lon"]; $lgn = $linha["logradouro"]; $bar = $linha["bairro"]; $cep = $linha["cep"]; $localidade = $linha["localidade"]; } $query2 = mysql_query("select * from busca_dados where id = '".$id."'") or die(mysql_error()); while($linha2 = mysql_fetch_array($query2)){ $lat2 = $linha2["latitude"]; $lon2 = $linha2["longitude"]; if(($lat2 != "") && ($lon2 != "")){ $lat = $linha2["latitude"]; $lon = $linha2["longitude"]; } } ?>