So I'm trying to create a dropdown list that populates with the table names from the database.
Right now, it's just repeating the first result a million times in the dropdown list. I think there is something wrong with my while loop.
n.b. this is not getting the rows from within a table into a listmenu, this is the actual table names.
$result = mysql_query("SHOW TABLES FROM databasename")
or die(mysql_error());
$nt=mysql_fetch_array($result);
<SELECT>
<?php
while($nt){
echo "<option value=" . $nt[0] . ">" . $nt[0] . "</option>";
}
?>
</SELECT>
cheers,