The html is in the follwing format:
<html>
<head>
<title>someTitle</title>
</head>
<form action="../cgiDir/go.pl" method=POST>
<input type=hidden name="a" value="aswdc">
<input type=hidden name="b" value="4">
<input type="submit" name="B1" value="Submit">
</form>
</body>
</html>
The cgi is in the following format:
#usr/etc.
use CGI;
use HTTP::Request::Common;
use LWP::UserAgent;
$query = new CGI;
$query->use_named_parameters(1);
$var1 = $query->param('a');
$var2 = $query->param('b');
$ua = new LWP::UserAgent;
$req=POST 'http://www.someqURL.com',[v1=>$var1,v2=>$var2];
print $ua->request($req)->as_string;
exit 0;
I keep on getting a Server error. What am I doing wrong?
Thanks in advance.
Originally posted as a Categorized Question.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.