-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathselectcidade.php
83 lines (67 loc) · 1.94 KB
/
selectcidade.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
if(!isset($_GET['t'])){
header("Location: index.php");
}
$tipo = $_GET['t'];
?>
<html>
<head>
<!------BY BRUNO VASCONCELLOS - VIP DESENVOLVIMENTO------->
<title><?php echo $tipo; ?></title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="icon" type="icon" href="img/favicon.png">
<style>
.wher{
text-decoration: none;
color: red;
}
.wher:hover{
color: #12345678;
}
</style>
</head>
<body>
<table align="center" width="100%" style="background-color: #ccc" border="0">
<tr>
<td align="right" style="width: 46%">
<a href="index.php"><img src="img/vip-white.png" width="100%" style="max-width: 200px"></a>
</td>
<td>
<font style="font-weight: bold; font-size: 24px; font-family: Verdana; color: white">Viabilidade</font>
</td>
</tr>
<tr>
<td align="right">
<a href="index.php" class="wher">Inicio-></a><?php echo $tipo; ?>->
</td>
</tr>
</table>
<center>
<div style="width: 300px;">
<?php
if($tipo == 'casa'){
echo '<form action="consulta_casa.php" method="GET">
<header style="margin-top: 20px; font-weight: bold">Selecione a Cidade</header>';
$query = "SELECT * FROM casa group by cidade";
}else if($tipo == 'predio'){
echo '<form action="consulta_geo.php" method="GET">
<header style="margin-top: 20px; font-weight: bold">Selecione a Cidade</header>';
$query = "SELECT * FROM predio group by cidade";
}else{
header("Location: index.php");
}
require 'connect.php';
$result = mysqli_query($connection, $query);
$result->data_seek(0);
echo "<select name='cidade' class='form-control'>";
while($row = $result->fetch_assoc()){
echo "<option value='".$row['cidade']."'>".$row['cidade']."</option>";
}
echo "</select>";
?>
<button class="btn btn-success" style="margin-top: 20px">Validar</button>
</form>
</div>
</center>
</body>
</html>