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:
Sending Variables from my script to a HTML Page



Jun 12, 2001, 10:32 PM

Post #1 of 2 (870 views)
Sending Variables from my script to a HTML Page Can't Post

How do I send the variables that I get with my script to a HTML page with out using the get method?

I have a script that I use to get some vital information from users that visit my website. The scripts consists
of a form with the get method, where the users fills the requested information. The scripts validates the information before submiting it to our database.

Once verified, all the information is then stored in a local data base in my server.

What I whant to do, is after collecting the information, is to send it to a webpage in another server.

How can send this variables to a HTML page with out using the get method.

Right now I use the get method to resend the variables to a second webpage in another server , but the variables are visible in the url. What I whant to do is to avoid this:

$url = "../reports.html?cas=$name_cas&userid=$user&pass=$pass&phone=$phone&email=$email&response_code=AR&num_autoriza=$response_aut&operation=$com_internal&date=$fecha:$hora&amount=$entero.$decimal";

The purpose of this is to send the information that I collect to another server where ths information is also going to be stored in a database.

There can be more than one user at the same time posting their information.



Jun 17, 2001, 9:14 AM

Post #2 of 2 (849 views)
Re: Sending Variables from my script to a HTML Page [In reply to] Can't Post

you can use the "post" method instead...but you must include the variables and their values as hidden fields.

sending data to a server using the "post" method is basically the same as the get...just check any html reference.

however parsing of data by the cgi script may be different.

here is the script i use for parsing to both get and post methods. the sent variables are then used as $formdata{'variable'}

#beginning of code
if($method eq "GET") {
} else {
foreach $fieldvalue(@value_pairs) {
$value=~s/ /\0/eg;
$value=~tr/+/ /;
#ending of code

if you need some more explanation, please do email me at


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

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