get a response from server in android
<pre><code>    HttpClient httpclient=new DefaultHttpClient();  
            HttpPost httpPost=new HttpPost("http://10.0.2.2/android_post/post.php");
             List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
                nameValuePairs.add(new BasicNameValuePair("id","manoj"));
                nameValuePairs.add(new BasicNameValuePair("password", " "));
                nameValuePairs.add(new BasicNameValuePair("action", "validate_password"));
                try {
                    httpPost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
                } catch (UnsupportedEncodingException e1) {
                    // TODO Auto-generated catch block
                    e1.printStackTrace();
                    Log.i("LEE", "cannot connect to server");
                }

                try {
                    HttpResponse response = httpclient.execute(httpPost);
                    String t=response.getParams().toString();


                    TextView tview=(TextView) findViewById(R.id.textView1);
                  tview.setText(t);
                } catch (ClientProtocolException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                } catch (IOException e) {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
                }



        }
</code></pre>

<p>but i can't get the response text.my php file code is this:</p>

<pre><code>if(isset($_POST)){
$id=$_POST['id'];

print "Hi! I \'m the server";
}
</code></pre>

<p>can any one help me??</p>
