> I'm trying to post to a web form and get the results back,
> I've tried but it seems that I am not posting anything to the page.
> What am i doing wring ?
> 
><form name="search" method="post" action="index.php?action=edir">
><tr>
> <td align="left" valign="baseline">
>  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
>     <tr>
>       <td><img src="images/heading/search.gif" width="68" height="15"></td>
>       <td>&nbsp;</td>
>     </tr>
>     <tr>
>      <td><input name="query" type="text" size="15"></td>
>      <td><input type="image" src="images/btn_search.gif" width="82" 
> height="23">
>          <input name="searchtype" type="hidden" value="number"></td>
>    </tr>
>  </table>
> </td>
></tr>
></form>
> 
> #!/usr/bin/perl
> 
> use strict;
> use lib "/common";
> use LWP;
> 
> 
> my $browser = LWP::UserAgent->new;
> 
> my $URL = "http://www.dhivehinet.net.mv/index.php?action=edir&page=0";;

Well, only the author of what lives at index.php will know for sure,
but your URL does not precisely match the action attribute of the
form element. 

> 
> my $response = $browser->post( $URL,
>     [ 'searchtype' => '3';
>     ]
> );
> 

Again, only the author of index.php would know for sure but passing in
'3' where the word 'number' is expected in the searchtype field may
lead to your lack of joy.

Not passing in any value for 'query' might also be causing grief.

-- 
        Lawrence Statton - [EMAIL PROTECTED] s/aba/c/g
Computer  software  consists of  only  two  components: ones  and
zeros, in roughly equal proportions.   All that is required is to
place them into the correct order.


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


Reply via email to