send data http to webserver no result
<p>i create a simple tutorial send data to server</p>

<p>i create a button inside onCreate</p>

<pre><code>Button button = (Button) findViewById(R.id.send);
        button.setOnClickListener(new View.OnClickListener() {
            public void onClick(View v) {
                // Perform action on click

                postData();
            }
        });
</code></pre>

<p>here is my code to send the data</p>

<pre><code>public void postData() {
        // Create a new HttpClient and Post Header
        HttpClient httpclient = new DefaultHttpClient();
        HttpPost httppost = new HttpPost("http://www.www.www/hama/test123.php");

        //This is the data to send
        String MyName = "adil"; //any data to send

        try {
        // Add your data
        List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(1);
        nameValuePairs.add(new BasicNameValuePair("action", MyName));

        httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

        // Execute HTTP Post Request

        ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();
        String response = httpclient.execute(httppost, responseHandler);

        //This is the response from a php application
        String reverseString = response;
        Toast.makeText(this, "response" + reverseString, Toast.LENGTH_LONG).show();

        } catch (ClientProtocolException e) {
        Toast.makeText(this, "CPE response " + e.toString(), Toast.LENGTH_LONG).show();
        // TODO Auto-generated catch block
        } catch (IOException e) {
        Toast.makeText(this, "IOE response " + e.toString(), Toast.LENGTH_LONG).show();
        // TODO Auto-generated catch block
        }

        }//end postData()
</code></pre>

<p>when i try to press the button there is no result in webserver when i try to refresh the page.
the page is blank and no result.</p>

<p>here is my php code</p>

<pre><code>&lt;?php

//code to reverse the string

$reversed = strrev($_POST["action"]);

echo $reversed;

?&gt;
</code></pre>

<p>how to fix that?</p>
