Re: redirection with perl

2001-09-26 Thread louie miranda
if ($FORM{query} eq "imaform") { $gotourl = "http://yoururl.com/";; } louie miranda (axishift.ath.cx) -- Security Is A Series Of Well-Defined Steps chmod -R 0 / ; and smile :) - Original Message - From: "Wagne

Re: redirection with perl

2001-09-26 Thread Brett W. McCoy
On Wed, 26 Sep 2001, Wagner wrote: > I want to do a redirection based on a variable > > for example: > > if ($name eq 'invader') { > > redirection to some URL ; > > } > > What do i have to put in the middle line to do the redirection... If you are using CGI.pm, there is a method called redir

Re: redirection with perl

2001-09-26 Thread Lisa Nyman
Hi, You can do a couple of things. 1) just print a Location: header like if ($name eq 'invader') { print "Location:http://www.foo.com/invader\n\n";; } Or, using CGI.pm, use the redirect function: if ($name eq 'invader') { print redirect('http://www.foo.com/invader');