Reputation: 6403
Im trying to connect mysql with android but it throw me an error. Error in http connection java.net.UnknownHostException:
Below is my code:
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://www.pherma.net84.net/admin/getAllPeopleBornAfter.php");
httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = httpclient.execute(httppost);
HttpEntity entity = response.getEntity();
But the URL s working fine. Please copy n paste the url.
Upvotes: 4
Views: 1610
Reputation: 6403
I forget to put network permission in manifest. Working fine now.
Upvotes: 4