-
Notifications
You must be signed in to change notification settings - Fork 0
/
bico.php
40 lines (40 loc) · 1.01 KB
/
bico.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
<html>
<head>
<link rel="stylesheet" type="text/css" href="estilo.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Raleway">
</head>
<body>
<div class="conteudo">
<a href="index.html"><div class="logo"></div></a>
</div>
<?php
session_start();
$host = "localhost";
$dbusername = "id11533851_aves";
$dbpassword = "zoobrvencedor";
$dbname = "id11533851_aves";
$conn = new mysqli ($host, $dbusername, $dbpassword, $dbname);
if (mysqli_connect_error()){
die('Connect Error ('. mysqli_connect_errno() .') '. mysqli_connect_error());
}else{
$sql = "SELECT DISTINCT bico FROM aves";
$result = $conn->query($sql);
}
?>
<div class="form">
<form method="get" action="registra_bico.php">
<div class="texto">Bico</div>
<select name="bico">
<?php
while($row = $result->fetch_assoc()) {
$nat1 = $row['bico'];
echo "<option value='$nat1'> $nat1 </option>";
}
?>
</select>
<a href="dorso.php" class="voltar">Anterior</a>
<input type="submit" value="Próximo">
</form>
</div>
</body>
</html>