Reputation: 64024
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.
Upvotes: 3
Views: 8998
Reputation: 149813
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');
Upvotes: 7
Reputation: 5761
Using the POST or GET method:
http://www.scs.leeds.ac.uk/Perl/Cgi/textareas.html
Upvotes: -2