i bir veritabanından tablo isimleri ile bir liste doldurmak istiyor. Burada ben bunun için yazdım kod ama çalışmak için görünmüyor
<select id="arrays" name="arrays" style="width: 403px;" class="Fieldcell">
<?php
$dbname = 'myBase';
if (!mysql_connect('localhost', 'root', '')) {
echo 'Could not connect to mysql';
exit;
}
$sql = "SHOW TABLES FROM $dbname";
$result = mysql_query($sql);
if (!$result) {
echo "DB Error, could not list tables\n";
echo 'MySQL Error: ' . mysql_error();
exit;
}
$num_tables = mysql_num_rows($result);
for($i=0;$i<$num_tables;$i++)
{
echo "<option value=\"$row[i]\">$row[i]</option>";
}
/*while ($row = mysql_fetch_row($result)) {
echo <option value=\"$row[0]\">$row[0]</option>";
}*/
mysql_free_result($result);
?>
</select>