I am trying to connect to a remote database in this case "localhost" in android for some reason I am geting an error saying that Connection to http://localhost refused . i am not sure what is causing this , but my guess is it is this line below
response = CustomHttpClient.executeHttpPost("http://localhost/check.php", postParameters);
String res=response.toString();
// res = res.trim();
res= res.replaceAll("\\s+","");
//error.setText(res);
if(res.equals("1"))
error.setText("Correct Username or Password");
else
error.setText("Sorry!! Incorrect Username or Password");
} catch (Exception e) {
error.setText(e.getMessage());
}
}
});
Thanks for any help