login.html
<form method="POST" action="login.php">
<input type="text" name="username">
<input type="password" name="password">
<button class="_sdf3">Login</button>
</form>
login.pl
#!/usr/bin/perl
use LWP::UserAgent;
my $username = "admin";
my $password = "pass2321";
my $url = "http://127.0.0.1/login.html";
my $ou = new LWP::UserAgent;
my $req = $ou->post($url,{ username => $username , password => $password , });
my $code = $req->code;
if ("$code" eq "302"){
print "Username And Password OK";
}else{
print "Username And Password BAD";
}
When I run login.pl
i will see Username And Password BAD
but the data is right!!
I want to fix this problem while using <button class="_sdf3">Login</button>
in login.html