Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Being relatively new to CGI, the first thing I did was code up a vanilla HTML form that passes parameters to a CGI.pm script which successfully uses them to talk to a database and simply dumps the results to the screen. The next step is to place links next to each result that will provide additional information when clicked. This information must be dynamically retrieved from a different table in the database. I suppose I could use my cgi object to print a submit button with some parameters, but that's messy; I simply want embedded links that transfer parameters to the linked cgi script. Is this possible? Here's what I had thought would Do What I Mean, ie., providing additional non-HTML attribute/value pairs to the a tag:
The elements dereferenced from $data are defined. Currently, all that showquery.cgi does is print all parameters passed to it (and yes, headers and such are properly initialized beforehand). I get a blank page.... while ($data = $sth->fetchrow_arrayref()) { last if ++$count > $best; print "$count) ",join(' // ', @$data)," ", $cgi->a({href=>'showquery.cgi', query=>$data->[0]},'query')," ", $cgi->a({href=>'showhit.cgi', query=>$data->[0], hit=>$data->[1]},'hit'), $cgi->br(); }
How should I go about the task of dynamically passing information from a webpage interface served up by one cgi script, to another cgi script?
Many thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing params between CGIs
by freddo411 (Chaplain) on May 23, 2003 at 20:54 UTC | |
|
Re: Passing params between CGIs
by tcf22 (Priest) on May 23, 2003 at 20:50 UTC | |
by Anonymous Monk on May 23, 2003 at 20:59 UTC |