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

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner:
Technique to re-pass arguments back to a cgi script

 



srhadden
Novice

Mar 7, 2012, 3:45 PM

Post #1 of 3 (721 views)
Technique to re-pass arguments back to a cgi script Can't Post

This is CGI question, I don't know where is the best place to post this question.

Basically, if a cgi script is called, it can generate an HTML and store values inside hidden input fields.

I am wonder what other techniques I could use to resend the arguments to my cgi script.

Basically like this.

1. cgi script is executed with query string ?var1=value1;var2=value2

2. the Cgi generates a input form. WHen the user presses a button I want to re-pass the arguments the cgi script was called with back to the same script.

If someone knows of a good web development forum let me know, I searched a bit and the top google hits found DUD web forums.


FishMonger
Veteran / Moderator

Mar 7, 2012, 4:29 PM

Post #2 of 3 (719 views)
Re: [srhadden] Technique to re-pass arguments back to a cgi script [In reply to] Can't Post

I think you need to give a better explanation of what you actual goal is, but if I read between the lines, it sounds like what you really need is to store your submitted data as session vars.

CGI::Session - persistent session data in CGI applications
http://search.cpan.org/~markstos/CGI-Session-4.48/lib/CGI/Session.pm

CGI::Session::Tutorial - Extended CGI::Session manual
http://search.cpan.org/~markstos/CGI-Session-4.48/lib/CGI/Session/Tutorial.pm


srhadden
Novice

Mar 8, 2012, 3:23 AM

Post #3 of 3 (713 views)
Re: [FishMonger] Technique to re-pass arguments back to a cgi script [In reply to] Can't Post

Thanks, that is probably the cleanest solution.

That is generally that is really what I was asking. If the user has to go through a series of web pages, I want some of the data to be carried down the chain. The dirty way was using hidden text fields which are then reposted to the next page and so on... works for simple cases.

Haven't used session myself yet, so that is probably where I need to look.

I looked into redirect and post from a cgi script, but redirecting seems pretty sloppy and the browser catches this and displays prompts and things to get in the way, probably for good reason.

Thanks again. You take paypal donations or something? :)

 
 


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

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