in reply to Need buttons on web page for retrieving database values

What I am looking for is how to embed those java acript buttons with in my Perl Script. The design (not by me, Ime just the lackey carrying it out) calls for 12 buttons...I cannot have 12 submit buttons tied to seperate queries can I? thx
  • Comment on Re: Need buttons on web page for retrieving database values

Replies are listed 'Best First'.
RE: Re: Need buttons on web page for retrieving database values
by btrott (Parson) on Mar 28, 2000 at 05:54 UTC
    You can if you give them names. For example, in your HTML:
    <input type=submit name=do_connect value="Connect"> <input type=submit name=do_results value="Get Results">
    Then, in your program:
    use CGI; my $query = new CGI; if ($query->param('do_connect')) { # connect to database } elsif ($query->param('do_results')) { # get results of sql call }
    Or something along those lines.