This script was born out of necessity for me. I was creating quite a few reports that are to be extracted from MySQL database. Format them into a table like structure, with or without headers. And be able to view as HTML, download as HTML, or downloa...