Don't know why I'm being discouraged from echoing any HTML. This example echoes the HTML results, which seems a practical solution for this project.

http://www.tizag.com/phpT/examples/formexample.php