I want something like that.i have a button and 2 textbox when user put their username and password and then click on login button then login action will be performed and then welcome the user and go to another page .my code was like that:
try {
Connection.Response res = Jsoup.connect("URL")
.data("log", "abcd", "pwd", "12345", "wp-submit", "প্রবেশ", "redirect_to", "url", "testcookie", "1")
.method(Method.POST)
.execute();
Map<String, String> cookies = res.cookies();
Document doc2 = Jsoup
.connect("new_url")
.cookies(cookies)
.get();
s = doc2.text().toString();
t.setText(s);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
t.setText("no");
}
But login action cant be successful and here it always shows "no". How can i successfully do that???