I'm not able to do a select that pulls the data from the Database, I wish someone could help me ...
<!DOCTYPE html>
<html>
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<center>
<h1>Adicionar ítem e categoria</h1>
<form action="adicionar_item.php" method="post">
<p><label for="item">ítem:</label>
<input type="text" name="item" id="item" autofocus></p>
<p><label for="categoria">Selecione a categoria:</label> <select name="categoria" id="categoria">
<option></option>
<?php
$sql="SELECT nome FROM categoria";
$resultado=$conexao->query($sql);
while($dados = $resultado->fetch_assoc()){
echo "<option value=".$dados['nome'].">".$dados['nome']."</option>";
}
?>
</select></p>
<input type="submit" value="Cadastrar">
</form>
</center>
</body>
</html>