i tried to connect to my external database but i have an error and i don't know why, here is my code
try{
String link = "http://127.0.0.1/Myfile.php";
//HttpClient httpclient = new DefaultHttpClient();
URL url=new URL(link);
//HttpPost httppost = new HttpPost(link); //YOUR PHP SCRIPT ADDRESS
// HttpPost httppost = new HttpPost("http://172.23.193.32/elift-test/myfile.php"); //YOUR PHP SCRIPT ADDRESS
HttpURLConnection response = (HttpURLConnection) url.openConnection();
response.connect();
//isr = response.getInputStream();
}
catch(Exception e){
Log.e("log_tag", "Error in http connection "+e.toString());
resultView.setText("Couldnt connect to database");
}