My android local host not working
<p>I am trying to send data to my php file and get response but couldn't able to do it I don't know why but i am not receiving any value on my php server. Please help me out</p>

<p>Android Code:</p>

<pre><code>HttpClient httpclient = new DefaultHttpClient();
                    HttpPost httppost = new HttpPost("http://10.0.2.2/first.php");
                try {
                    List&lt;NameValuePair&gt; nvp= new ArrayList&lt;NameValuePair&gt;(2);
                nvp.add(new BasicNameValuePair("uid", "mirza"));
                nvp.add(new BasicNameValuePair("pass", "mirza"));
                httppost.setEntity(new UrlEncodedFormEntity(nvp));
                HttpResponse response = httpclient.execute(httppost);


            }

             catch(IOException e){

            }
         }
</code></pre>

<p>PHP CODE:</p>

<pre><code>$  user =   $_POST  ["uid"];
$   pwd  =   $_POST  ["pass"];
$con= mysql_connect("localhost","root");
if(!  $con)
{
    die("Not able to connect");

   }
 mysql_select_db("try",  $con);
$result=mysql_query("Select * from info where uid='  $user  'and pass='  $pwd  '");

if( mysql_num_rows(   $result)&lt;=0)
{
    echo "unsuccessful";
}
else{
   echo "successful";
}
mysql_close(  $con);
?&gt;
</code></pre>
