title: Can't login from my Android app using HttpPost
body: <p>The php code </p>
  
  <pre><code>$userName=$_POST['userName'];
  $userPassword=$_POST['userPassword'];
  .
  .
  $result=MYSQL_QUERY("SELECT * FROM USER WHERE UserName='$userName' and   Password='$userPassword' ");
  
  $count=mysql_num_rows($result);
  
  if($count==1){
  
  session_start();
  $_SESSION["userName"] = "$userName";
  echo 1;
  header('Location: http://www.naviwi.com/points.php');
  }
  else {
  header('Location: http://www.naviwi.com/signUp.php');
  }
  ob_end_flush();
  
  ?&gt;
  </code></pre>
  
  <p>The java code. I get the username and password values from two TexitEdit IO. </p>
  
  <pre><code>public void userLogin(View view){
  
  
          HttpClient httpclient = new DefaultHttpClient();
          HttpPost httppost = new HttpPost("http://naviwi.com/checkLogin");
  
          List&lt;NameValuePair&gt; nameValuePairs = new ArrayList&lt;NameValuePair&gt;(2);
          nameValuePairs.add(new BasicNameValuePair("userName", username));
          nameValuePairs.add(new BasicNameValuePair("userPassword", password));
          try {
              httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
          }catch(UnsupportedEncodingException e){
              et.append("UnsupportedEncodingException");
          }
  
          try {
              response = httpclient.execute(httppost);
          }catch (Exception e) {
              et.append("Server not Responding"+ response);
          }
  
          et.append(" Server respond "+response);
      }
  </code></pre>
  
  <p>So the problem is that I always get null. I want to get the 1 from the response method in PHP.</p>