LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   PERL:: passing variables with links? (https://www.linuxquestions.org/questions/programming-9/perl-passing-variables-with-links-87325/)

ocularbob 08-30-2003 09:37 AM

PERL:: passing variables with links?
 
I'm having tons of fun with perl!

this is my project so far:
workinprogress

i would like both links "home" and "admin" to run the same script
but pass a variable to the script, $MODE="home"; for home
$MODE="admin"; for admin.

yeah i'm new at this. :)

thanks alot

SaTaN 08-30-2003 09:49 AM

In the place of < href="/cgi-bin/tfp2/tfp2.cgi" u can give
<href="/cgi-bin/tfp2/tfp2.cgi?mode=home" in case of home link
and <href="/cgi-bin/tftp/tftp2.cgi?mode=admin"

Then these values can be got by accessing the
$string = $ENV{'QUERY_STRING'}; in the CGI script......

I suppose this will solve ur problem.

ocularbob 08-30-2003 09:55 AM

that looks like it all right.
thanks to the prince of darkness


All times are GMT -5. The time now is 09:31 AM.