added form generator
and sample query script
run genform > query.html
  then put r.php in same directory as query.html
  load query.html

(note there are still bugs in the queries within r.php)