title: How to retrieve all table names from database?
body: <p>I'm trying to retrieve all table names from a MySQL database and link them to a dropdown list. Then I want to store those table names in a table and preview them. </p>
  
  <p>here's my code...</p>
  
  <pre><code>&lt;?php 
  $sql = "SHOW TABLES FROM $ip";
  $result = mysql_query($sql);
  ?&gt;
  &lt;form id="form1" name="form1" method="post" action="newloay.php"&gt;
  &lt;select name="select" id="select" required&gt;
      &lt;?php
       while($row =  mysql_fetch_array($result)){
      ?&gt;
          &lt;option&gt; &lt;?php print $row[0] ?&gt; &lt;/option&gt;
      &lt;?php 
       }  ?&gt;
  
      }
  &lt;/select&gt;
  </code></pre>