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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lwp and enctype

Status
Not open for further replies.

kevin197

Programmer
Mar 21, 2002
88
GB
I'm trying to submit some form data to a script using lwp.

I've got it working for one site using POST instead of get but the other site isn't working.

The only differance I can see is that is uses enctype
Code:
<form action="submit.cgi" method="post" enctype="multipart/form-data">
How would I pass this using the script below to make it work?
Code:
$ua = LWP::UserAgent->new(); 
$resp = $ua->post("$submiturl", 

{ "$namehandle" => "$name", 

"$passwordhandle" => "$submitpassword", 

"$emailhandle" => "$email", 

"$urlhandle" => "$url", 

"$descriptionhandle" => "$description", 

"$cathandle" => "$cat" });
 
If anyone needs any more info or if I've not explained it very good let me know :)
 
Thanks for your help, I did it the way of the sample code on that site and it works now :)

Great name by the way ;)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top