CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
Search Posts SEARCH
Who's Online WHO'S
Log in LOG

Home: Perl Programming Help: Beginner:
passing variables from one script to another..


New User

May 18, 2003, 11:53 PM

Post #1 of 3 (283 views)
passing variables from one script to another.. Can't Post

Hi all,

I have an html form that passes variables to .....this script then takes the info and enters it into a database. I need a snippet of code that will then take the variables and pass it to I have been using the following with no luck...

#perl script that takes get and post-params, and give those params to another script

use strict; #force declaration of variables
use CGI; #cgi-package for param-retrieval

my ($query, $key, $external_script, $param_line);

$query=new CGI;

foreach $key ($query->param) {
#concatenate the parameters to a string
$param_line = $param_line.' '.$key.'='.$query->param($key);

system ("$external_script$param_line");

I have also tried hardcoding it, just to see if my variables are hitting

system("../forums/ikonboard.cgi $act, $CODE");

no luck there either. both of these are hitting the second script and printing out underneath scritp1's output...But not passing the variables.. I sure could use some help on this... very frustrated to say the least!

thanks in advance,


p.s. where can I get this nifty html editor?

(This post was edited by th3monk3y on May 18, 2003, 11:54 PM)


May 19, 2003, 12:04 AM

Post #2 of 3 (280 views)
Re: [th3monk3y] passing variables from one script to another.. [In reply to] Can't Post

is there any reason you cant just pass them in hidden tags?

<input type="hidden" name="param" value="$scalar">

New User

May 19, 2003, 12:32 AM

Post #3 of 3 (277 views)
Re: [th3monk3y] passing variables from one script to another.. [In reply to] Can't Post

Thanks for the blazing fast response... no pun Tongue

I am not sure what you mean? From the original html form, or from I guess when I say html form; this is not quite is a form that is created from a perl script.. the end result is still an html form though... please explain.. I am anxious to get past this hurdle... this is one of those deals when you are working on something else and discover you have to back track and change something only to get stuck!! uhg! Can you include an example?




Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives