figured out extraction to pass escaped sql queries through html page

Sweet. Now this all basically works. Next, can clean up.