Solved

Redirect from Posted form values

Posted on 1998-09-25
6
165 Views
Last Modified: 2010-03-05
I need a redirecting script that redirects to one of various .cgi scripts (named like http://www.mydomain.com/cgi-bin/first.cgi, or http://www.mydomain.com/cgi-bin/ second.cgi, etc...) depending on the customer id value contained in the form below which will be posted to the script. Below is the posted form.....

<form method="POST" action=" http://www.mydomain.com/cgi-bin/redirect.cgi">

<input type="hidden" name="INVOICE" value="1038">

<input type="hidden" name="DESCRIPTION" value="">

<input type="hidden" name="AMOUNT" value="$1.00">

<input type="hidden" name="CUSTID" value="thirtyrec">

<input type="hidden" name="TYPE" value="NA">

<input type="hidden" name="METHOD" value="MasterCard">

<input type="hidden" name="NAME" value="vern keller">

<input type="hidden" name="ADDRESS" value=" fisher rd">

<input type="hidden" name="CITY" value="somecity">

<input type="hidden" name="STATE" value="ca">

<input type="hidden" name="ZIP" value="12345">

<input type="hidden" name="COUNTRY" value="USA">

<input type="hidden" name="PHONE" value="541-123-4567">

<input type="hidden" name="FAX" value="none">

<input type="hidden" name="EMAIL" value="mymail@mydomain.com">



<input type="submit" value="Continue">

</form>

Thanx for any help. 65 points is all I got.......
0
Comment
Question by:vernk
  • 4
  • 2
6 Comments
 

Author Comment

by:vernk
ID: 1205011
Edited text of question
0
 

Author Comment

by:vernk
ID: 1205012
Edited text of question
0
 

Author Comment

by:vernk
ID: 1205013
Edited text of question
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 84

Expert Comment

by:ozo
ID: 1205014
use CGI qw/:standard/;
print redirect('http://www.mydomain.com/cgi-bin/'.(${{
thirtyrec =>      'first.cgi',
second      =>      'second.cgi',
}}{param(CUSTID)}||'unknown.cgi'));
0
 

Author Comment

by:vernk
ID: 1205015
works great....thanx again.....how do I give you the points?
0
 
LVL 84

Accepted Solution

by:
ozo earned 60 total points
ID: 1205016
use CGI qw/:standard/;
print redirect('http://www.mydomain.com/cgi-bin/'.(${{
thirtyrec => 'first.cgi',
second => 'second.cgi',
}}{param(CUSTID)}||'unknown.cgi'));
0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Extract multiple value with delimiters from a string 4 170
perl search and replace 6 168
.properties file to call function/method 9 61
Perl script to delete older files 6 85
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

776 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