CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Beginner: Re: [ChicagoOutfit] A URL validate function... what's wrong?: Edit Log



KevinR
Veteran


Jun 17, 2009, 2:49 PM


Views: 1110
Re: [ChicagoOutfit] A URL validate function... what's wrong?


Code
sub check_url_valid {   
my $val = shift;

foreach (@allow_redirect_to) {
return 1 if ($val eq $_);
}

print "Your feet smell like rotten eggs! Go away!";
exit;#<-- terminates script
}


You must print an http header first though before printing anything else back to the browser so make sure your script is doing that first. Try the above and see if it works. Use your own more appropriate error message. Wink
-------------------------------------------------


(This post was edited by KevinR on Jun 17, 2009, 2:50 PM)


Edit Log:
Post edited by KevinR (Veteran) on Jun 17, 2009, 2:49 PM
Post edited by KevinR (Veteran) on Jun 17, 2009, 2:50 PM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives