Hi Chip
I spent an hour and a half playing around with your file this morning and I can't get it to work. I googled around and found that other people had problems publishing raw HTML in a webviewer viewed via IWP also. Unfortunately, I don't have time to dig much deeper - maybe another expert can step in to help you here?
To get the webviewer to display content (when viewing directly within Filemaker) automatically, I added a script trigger to your Form View layout which runs your MyWebScript each time a record loads - see attached. This may or may not be useful. Obviously, I couldn't use your HTML code in the script because that's in your MySQL database which I cannot access, so you'll want to edit the 'set variable' script step to pick up the correct HTML.
Regarding using FMP to create HTML sites as a template - if you file is hosted on Filemaker Server, you can use Filemaker's PHP Site Assistant tool to automatically generate a PHP site based on your database. This is a bit limited and clunky, but it works for simple stuff. Alternatively, if you've got some experience with web development and PHP you can build your own PHP site from scratch using Filemaker's API for PHP (again only if you have Filemaker Server). There are several books out there on how to do it, but I can highly recommend this one to get you up and running really quickly:
http://www.fmwebschool.com/api_book.phpSorry I couldn't fully solve your problem.