designersx
asked on
hides more than 1 table from displaying in the dropdown.
this code below hides 1 table from the database named field_types and displays the other tables in a dropdown. i want to hide one more table that should not be displayed in the dropdown. please help me.
otherwise for 1 table, the code is working exactly fine.
i think we need to do something on line 8
otherwise for 1 table, the code is working exactly fine.
i think we need to do something on line 8
<select onchange="changeTargetURL(this);" action="default.php">
<option targetURL="" selected="selected">Select</option>
<option targetURL="new.php">create new</option>
<option>---------------</option>
<?php
$res = mysql_query("show tables") or die(mysql_error());
while ($row = mysql_fetch_array($res)){
if ($row[0] == 'field_types') continue;
$my_tables[] = $row[0];
}
foreach ($my_tables as $tablename){
?><option targetURL="<?php echo $tablename.".php"; ?>"><?php echo $tablename; ?></option><?php
} ?>
</select>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window