I want to create a HTML link. Such that when a link is clicked a CGI-script will be executed instead. That CGI script will take a parameter also.
I'm thinking of doing something like this:
<a href="./cgi-bin/run_script.cgi $param">Query</a>
Is there a right way to do it?
What I'm trying to do is to have a page that contain many words. When a word is clicked, a CGI script will be executed.
The right way would be:
<a href="./cgi-bin/run_script.cgi?param=value">Query</a>
To fetch the value of the parameter in your Perl script:
use CGI;
my $cgi = CGI->new();
my $param = $cgi->param('param');
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With