im trying to create a drop down many and populate the options from fields in a database that i have. So far i have got the following code:
<?php
session_start();
include_once("config.php");
$query = "SELECT Category FROM books";
$result = mysqli_query ($mysqli, $query);
echo "<select name=dropdown value=''>Dropdown</option>";
while($row = mysqli_fetch_array($result))
{
echo "<option value=$row[Category]>$row[Category]</option>";
}
echo "</select>";
?>
</div>
</body>
</html>
However when i try to view the page nothing seems to happen. My page remains blank and all i see is the color that i gave to the body in the css file.
Was wondering if anyone knew wh this was happening and if they can sort it out?
Thanks!