2
I’m having trouble properly assembling a <select>
within PHP, with data returned by mysqli
.
I tried this way:
<?php
$con = new mysqli("localhost", "root", "senha","bancodedados" ) or die (mysql_error());
$query = $con->query("SELECT * FROM pv_tipo_info_questionario");
while($reg = $query->fetch_array()) {
echo "<select><option name=\"ativo\" value=";
echo $reg["cod_tipo_info"];
echo "\"\>";
echo "<select><option name=\"ativo\" value=";
echo $reg["tipo_info_questionario"];
echo "\"\>";
}
?>
select brought the database information. E to put it in a way that works on the page and enable the button when selecting an option? Can you merge your code with mine? Thank you.
– fabricio_wm
@fabricio_wm I don’t know what the rest of your code is to help with that. Anyway, this question is about building the
<select>
Which, from what you say, is now settled. I suggest you open a new question asking how to control a button by choosing one<select>
!– Zuul