in reply to Need GUI for easy query and results

How do I get the HTML text fields to complete a query

To write and process forms. I still use CGI but that is being depreciated and some may suggest CGI::Simple to write and process forms.

run the query, SQL I think

I mostly use DBD::SQLite a subset of DBI, but at times use DBD::mysql.

All the DBI routines share the same query model. first you connect

my $dbh = DBI->connect("dbi:SQLite:dbname=$dbfile","","");
(above xample from DBD::SQLite)

then you setup.
$sth = $dbh->prepare("SELECT foo, bar FROM table WHERE baz=?");
then you run
$sth->execute( $baz ); while ( @row = $sth->fetchrow_array ) { print "@row\n"; }
(above example from DBI)

display results on the same HTML I started with?

Well that isnt quite true, you get some HTML, fill in the form, press the submit button, then you get NEW HTML back. But it will probably be from the same address. For the most part the same cgi code will first construct the page with the empty form, then when you press submit get the input from your browser, execute your sql from the input fields, then construct a page with the results and another form.