Solved

redirect form data to another form

Posted on 1998-05-11
7
171 Views
Last Modified: 2013-12-25
Hi, I have a form that receives data that I would like to forward to another form, but have no idea how to do so...I thought it would be possible to use a Perl script to do it, but I have no idea how to.  Any help would be appreciated..
0
Comment
Question by:coleslau
7 Comments
 
LVL 2

Expert Comment

by:alexbik
ID: 1828348
Hi,

You can make your perl script read the data, and then print the following to stdout:

Location: http://some.site.com/cgi-bin/script.cgi?var1=value1&var2=value2

Note that the var names and values need to be URL encoded. Since you are getting this data from a form, this is already the case. Make sure that you use a get_input routine that does _NOT_ decode the data, or you will have to encode it again yourself.

Alex.
0
 

Author Comment

by:coleslau
ID: 1828349
Hi Alex, I'm not sure if that will work because the form needs to be posted by method POST so the variables aren't passed on the query_path..

Steve
0
 
LVL 2

Accepted Solution

by:
alexbik earned 100 total points
ID: 1828350
Hi,

Are you absolutely sure about this? Most get_input routines accept data sent to them by both the GET and POST method. Even if the author of the site uses POST, this doesn't mean it won't work using GET..

If it doesn't, please let me know. I'll try to figure something out..

Alex.
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 7

Expert Comment

by:faster
ID: 1828351
If the other form script is on the same server as the first, you may also be able to invoke it directly.
0
 
LVL 84

Expert Comment

by:ozo
ID: 1828352
I was under the impression that the browser saved the variables somewhere in the HTTP header and that I would have to send the POST request myself too (like faster said), I'll try the GET method this weekend...
0
 

Author Comment

by:coleslau
ID: 1828353
Depending on what the next form is doing this might help.

You could try to make the perl script write the other form (so no redirect), but this only works when the other form is yours too. Parse the form-data from form 1, and write them as (hidden) variables into form 2.




0
 
LVL 28

Expert Comment

by:sybe
ID: 1828354
Sorry...I just realised I hadn't graded the answer.. =)
thanks again
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
This article will show, step by step, how to integrate R code into a R Sweave document
Learn the basics of strings in Python: declaration, operations, indices, and slicing. Strings are declared with quotations; for example: s = "string": Strings are immutable.: Strings may be concatenated or multiplied using the addition and multiplic…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question