title: send data from android app to cakephp whith url
body: <p>I wrote one android login app that get username and password from user. I whant to send username &amp; password to server that is <strong>cakephp application</strong>.This is my android code:</p>
  
  <pre><code>    httpclient=new DefaultHttpClient();
      httppost= new HttpPost("http://10.0.2.2/ar/users/login?name="+name+"&amp;password="+pass); 
  
      //Execute HTTP Post Request
      response=httpclient.execute(httppost);
      final ResponseHandler&lt;String&gt; responseHandler = new BasicResponseHandler();
      result = httpclient.execute(httppost, responseHandler);
      System.out.println("Response : " + response); 
      JSONArray jArray;
      jArray = new JSONArray(result);
      JSONObject j =new JSONObject();
      j = jArray.getJSONObject(0);
      JSONObject json = j.getJSONObject("User");
      text = json.getString("last_name");
  </code></pre>
  
  <p>I write only this line in layout:</p>
  
  <pre><code>         &lt;?php   echo $content_for_layout ?&gt;
  </code></pre>
  
  <p>view code:</p>
  
  <pre><code>        &lt;?php echo json_encode($user); ?&gt;
  </code></pre>
  
  <p>controller:</p>
  
  <pre><code>    function login() {
           if(isset($this-&gt;params['url']['name'])) 
           $data = $this -&gt; User -&gt; findByuser_name($this-&gt;params['url']['name']);
  
          if ($data &amp;&amp; $data['User']['password'] == ($this-&gt;params['url']['password'])) {             
  
              $this -&gt; set('user', $data);
  
          } else {
              $this -&gt; set('error', true);
          }
      }
  </code></pre>
  
  <p>this code work goodly by enter below url in browser but don't work in android app!
  "localhost/ar/users/login?name=m_sepehri&amp;password=111"
  anybody can help me?</p>