I’m trying to create a page where I input a MYSQL query: SELECT column1,column2 FROM table;, and dynamically create an HTML table with column titles.
EDIT: removed most of my question, just left the question part. I have since created a script that does this and included it as an answer. I hope someone else makes use of it like I do (when I’m too lazy to log into phpmyadmin … hahaha).
Well. Here’s how I accomplished this, building on webjprgm’s tip to use mysql_fetch_assoc:
php code to dynamically create a table with column titles, from PHP to mysql to html! :)