Guys can some read the below code and tell me what I'm doing wrong? I just want to post some values to a php script.

# Setup a user agent for LWP
use LWP::UserAgent;
my $LWPua = LWP::UserAgent->new;
$LWPua->agent("firefox");

#LWP - HTTP request 1
my $LWPreq1a = HTTP::Request->new(POST =>"http://www.scoilweb.net/construction/dev/dev102r.php";);
$LWPreq1a->content("recipient = [EMAIL PROTECTED]");
$LWPreq1a->content("subject = OnLineExped\-ORDER");
$LWPreq1a->content("followup-page = http:\/\/www.eset.sk\/order\/index.html");
$LWPreq1a->content("Reseller_Id = KILO865421");
$LWPreq1a->content("PurchaseOption  = NFR");
$LWPreq1a->content("TypeOfPlatform = NOD32 for Win9x\/Me\/NT\/2000\/XP\/2003\+DOS");
$LWPreq1a->content("TypeOf_License = 1");
$LWPreq1a->content("Clients_name = $FirstName $SecondName");
$LWPreq1a->content("Clients_email = [EMAIL PROTECTED]");
$LWPreq1a->content("Clients_phone = $RefNo");
$LWPreq1a->content("Expiration = 08\/14\/2006");
$LWPreq1a->content("Price = 39");
$LWPreq1a->content("Servers = 0");
$LWPreq1a->content("Note = This order was automatically submited by TMA1");

#Pass HTTP request 1 to user agent
my $LWPreq1 = $LWPua->request($LWPreq1a);

#Check response and add to info.txt
if ($LWPreq1->is_success) {print "success"} else {print "fail"};

Thanks
David

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to