Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I pass values from one cgi program to another?

Status
Not open for further replies.

sut

Programmer
Jun 6, 2001
12
0
0
US
Hi,
I have one cgi program and I want to include parameters in the following statement. I want to pass the parameter to edit_announce_type.cgi.

print a({href=>"edit_announce_type.cgi"},"Edit");

I want to write the above statment something like this:
print a({href=>"edit_announce_type.cgi?$key,$type"},"Edit");

How can I access these parameters in "edit_announce_type.cgi" ?

Waiting for reply!!!
Thanks
S
 
One suggestion would be to write the value to an external file and then read the same file from your second script. I`m sure there will be a more direct approach but this will allow you to prooceed for now.
Keith
 
You can get out of the CGI.pm syntax, if you want....
like this?

#!/usr/local/bin/perl
use CGI;
$cgi = new CGI;
print $cgi->header, $cgi-start_html; # CGI.pm syntax
# then, just print the link like you want it. Not CGI.pm-ish
print &quot;<a href=&quot;code.cgi?$key=$type&doWhat=Edit&quot;>link</a>&quot;;
# back to some object style stuff
print $cgi->end_html;

HTH If you are new to Tek-Tips, please use descriptive titles, check the FAQs,
and beware the evil typo.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top