- Impact
- 20
<?
echo "<select name='adasd'>";
$dbname="contentsystem";
$result = mysql_list_tables($dbname);
while($row = mysql_fetch_row($result)){
echo"<option value='$row[0]<br>n'>$row[0]<br>n";
}
mysql_free_result($result);
echo "</select>";
?>
I don't think I misunderstood you, but rather you didn't ask your question very well. You can't just expect someone to read your mind. It's really a waste of time for others to help you when you ask questions that really say nothing about what you're actually wanting to do and they try to help you out and you come back with what you should have said in the first place. If you read your original question I think you'll see that I did in fact answer exactly what you asked. You need to put a little thought and effort into your questions.Originally posted by adam_uk
ahhhhhh sorry you have mis understood me
And you see with a little thought and effort on your part you could have came up with that in the first place.Originally posted by adam_uk
i want to create my own version (or at leaslest select the tables and then add them to a drop down box)
i know how to use phpmy admin
i just dont know how to select the names of the tables from a database in php
echo "<select name=tables size=1>n";
$result = mysql_query("SHOW tables");
while($row = mysql_fetch_row($result)){
print "<option>$row[0]n";
}
echo "</select>n";