Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Multipart CGI Forms?

Multipart CGI Forms?

Multipart CGI Forms?

I'm having some problems with a CGI program.  Although this is a Perl forum, it seems to have more activity than the CGI-Bin forum.  Please help.

1.  HTML sends info to a CGI program.
2.  CGI program reads in the data and generates new HTML
**here's the problem**
3.  After the new HTML is generated by the CGI, changes are made to form data and then submitted, requiring a new HTML to be generated.  I can't get this part to work unless I save the posted form data to a text file, launch a new cgi, read in the values, then create the next html.  I'd like to be able to do this all from within the same cgi program.



RE: Multipart CGI Forms?

As there are a zillion (well, at least more than one) way to generate the html you are mentioning, would you consider posting some of your perl code that generates it.  Then some of us can get a better handle on what needs/might be able to be done.

RE: Multipart CGI Forms?

Hi BobMCT,

I wish I could but the script and code is covered under an NDA (non-disclosure agreement).  If it was not under the NDA I would have posted it when I first asked.  

If you would be so kind as to display one or two of the many ways to do this, I would greatly appreciate it.

At present, the project is working fine but is pretty ugly.  As each subsequent html & formdata is generated, it get's passed to a new cgi which interacts with Oracle, returns some data and reposts to a new html.  Surprisingly, this appears to work very fast. (maybe I should just leave it alone?)

Thanks in advance,


RE: Multipart CGI Forms?

Well, here's a simple shot:
The way form fields are delivered BACK into a cgi script is with one of two ways; they either come in from sysin or via a single variable called QUERYSTRING.  In either case the values must be parsed out of the data stream with logic that you can locate on the CPAN site or on perl.com or perl.org.  These routines should be executed at the beginning of your cgi scripts and will separate the data elements from their associated data names (hashes) so you can reference and reuse them.  Once you have the routine it is generic and should work, without change, is all of your scrips.
Hope this helps.

ps:  look for names like formsparse or forms, etc when searching the recommended sites.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close