in reply to Re: My Mechanize script cannot work ?
in thread My Mechanize script cannot work ?

Thank you. I manage to get to the right login page.
However I get this return whil submit the form.
Unexpected field value http://www.thesite.com/members/login.asp at (eval 5) line 1
What is going on ? I dump the filled in form and return:

uid=<UNDEF> (hidden)
tuid=username
password=pass123 (password)
cb= (hidden)
vcid=dummy (hidden)
submit1=Login now (submit)

Thanks again. ^_^
  • Comment on Re: Re: My Mechanize script cannot work ?

Replies are listed 'Best First'.
Re: Re: Re: My Mechanize script cannot work ?
by Corion (Patriarch) on Aug 07, 2003 at 11:51 UTC

    Without seeing your code, it is very hard to guess what happens there. I guess from your description that the script prints the message Unexpected field value http://www.thesite.com/members/login.asp at (eval 5) line 1 while running. I don't know what might cause this message to be printed, so I guess that it has something to do with how you are passing form values to the $mech object.

    perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web