Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

redirect form data to another form

Posted on 1998-05-11
7
Medium Priority
?
184 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 300 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
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 
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 85

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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

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

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 …
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses

972 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