php如何从数据库中创建所有表的下拉列表选择输入?

for example, I have a database named "school", and it contains 3 tables "teacher", "student" and "staff". I wanna create one form with one select input with option of all 3 tables, and you can choose any of these 3 tables to insert data into.

thank you.

To get all table name from database try this:

SELECT TABLE_NAME 
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE' AND TABLE_SCHEMA='dbName'

Note: Use select2 library or other library for multi-pick list.