What year was this written? 2000? In this day and age, MySQL queries should be hidden away behind a database abstraction layer, and results should be pulled using a method in an object model, formatted in a controller, then passed to a templating system for display. Echoing tables? Please!