in reply to Re: Hiding passed values in url
in thread Hiding passed values in url

I am looking into the UserAgent module and here is my attempt but it doenst seem to be working.
use strict; use CGI qw(:standard); use LWP::UserAgent; use HTTP::Request::Common; my $query = new CGI; my $name = $query->param("name") || ""; my $city = $query->param("city") || ""; #do perl mail stuff here #etc...... $ua = LWP::UserAgent->new; $ua->request(POST 'http://webserverhere/mydirectory/act.cfm', [name => + $name, city => $city]); #not sure what do to from here?

Replies are listed 'Best First'.
Re: Re: Re: Hiding passed values in url
by matija (Priest) on Mar 22, 2004 at 21:28 UTC
    You are throwing away the result of the request. You should do something like:
    $result=$ua->request(POST 'http:.... if ($result->is_success) { # Everything OK print $result->content; # send everything to the user } else { # There was an error in the CF script die "or do something equaly drastic"; }