Solved

redirect form data to another form

Posted on 1998-05-11
7
170 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
The viewer will learn how to count occurrences of each item in an array.

708 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now