mysql - Show all tables from database into select form in php -



mysql - Show all tables from database into select form in php -

hiho, have little problem showing table names on page in form .

code bellow:

<select name="users" onchange="showtables(this.value)"> <option value="">select table:</option>'; $result = mysql_list_tables($db_name); ($i = 0; $i < count(mysql_num_rows($result)); $i++){ echo '<option value="' . mysql_tablename($result, $i) . '">' . mysql_tablename($result, $i) . '</option>'; } echo '</select> </form> <br> <div id="tablesdb"><b>all content selected table listed there.</b></div></div>';

i seek mysqli ,and results still without names of tables , nil can select.

maybe know how work.

first, want using mysqli, mysql extension deprecated. second, can of info need in simple select query this:

select `table_name` information_schema.tables

php mysql mysqli

Comments

Popular posts from this blog

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -