Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Receiving form input and then redirecting this to an ASP page

Status
Not open for further replies.

RevsEd

Programmer
Apr 2, 2001
33
GB
Hi,

although I know ASP I know absolutely nothing about Perl. I've grabbed your FAQ and got the examples to work, so now am slightly better off than I was an hour or so ago.

My problem: I'm writing an ASP site which hits a Payment validation site and then has to write the result of the payment back to the database. All was going well until I realised that the only return values I get on the payment transaction are posted to a CGI script. Now, after playing with the examples in the FAQ I'm getting the return values okay. However, what I now want is for the CGI to just be used as a gateway back to ASP (and familiar ground). Basically, I'd like the cgi to receive the input and then post this on to an ASP form (without any user intervention).

I reckon this is possible, Perl seems a powerful language, I just don't have time to learn it and wondered if someone could be kind enough as to point me in the right direction - even if only to say that xxxx is the Perl equivalent of ASP's Redirect command.

Many thanks

Darren
 
perl was not originally designed with cgi scripts in mind, but there was later added the CGI module which handles all these things. within that module is the method 'redirect', whose first argument is the uri of the place you want to be redirected to. to get this to work, the script has to load in the CGI module, which it may already be doing (look for 'use CGI'), and then you'll have to create a new CGI object (look for 'new CGI'). then, you call the redirect method like this:[tt]
my $query = new CGI;
#other stuff
$query->redirect('[/tt]

or whatever your needs may be. "If you think you're too small to make a difference, try spending a night in a closed tent with a mosquito."
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top