How to get all fields for editing just like in PhpMyAdmin?

How to get all fields for editing just like in PhpMyAdmin?

Actually I have to make several forms, which will be having more than 50 fields in each, and each form is for separate category.

I want something like all columns present in the MySQL database automatically comes up, as in PhpMyAdmin.

I can tell the function my table name.
Please give me any idea…

mysql.com has all this sort of stuff - as does google.

“show columns from tablename” will return an array of column names.