title: Always Null when using the Android Volley
body: <p>I am new to the android and I created a simple web server with login functionality using PHP. When passing parameters from Android to this server always receiving null.
  Below is my code.</p>
  
  <p>My java class to connect to my online server:</p>
  
  <pre><code>public class LoginActivity extends AppCompatActivity  {
  
  private  EditText userNameEd,passwordED;
  private  Button   login;
  private String LOGIN_URL = "http://404-76-01.com/appLogin.php";
  public static String KEY_USERNAME = "username";
  public static String KEY_PASSWORD = "password";
  private String srtUsername,srtPassword;
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_login);
  
      userNameEd = (EditText) findViewById(R.id.username);
      passwordED = (EditText) findViewById(R.id.password);
      login    = (Button)   findViewById(R.id.signin);
  
      login.setOnClickListener(new OnClickListener() {
          @Override
          public void onClick(View view) {
  
             srtUsername = userNameEd.getText().toString();
             srtPassword = passwordED.getText().toString();
              //Toast.makeText(LoginActivity.this, "This is my Toast message!"+srtUsername,
                      //Toast.LENGTH_LONG).show();
             // WebService toLogin = new WebService();
                     // toLogin.login(srtUsername,srtPassword);
  
              login(srtUsername,srtPassword);
          }
      });
  }
  
  
  public void login(final String username, final String Password){
      StringRequest stringRequest = new StringRequest(Request.Method.POST, LOGIN_URL,
              new Response.Listener&lt;String&gt;() {
                  @Override
                  public void onResponse(String response) {
                     if (response.equals("123")) {
                          callToMenu();
                          Toast.makeText(LoginActivity.this,srtPassword +"/t" +srtUsername ,
                                  Toast.LENGTH_LONG).show();
  
                      } else {
                         //Toast.makeText(login, response, Toast.LENGTH_LONG).show();
                          Toast.makeText(LoginActivity.this, srtPassword +"/t" +srtUsername,
                          Toast.LENGTH_LONG).show();
                          //callToMenu();
                      }
                      Toast.makeText(LoginActivity.this,response.trim() ,
                              Toast.LENGTH_LONG).show();
  
                  }
              },
              new Response.ErrorListener() {
                  @Override
                  public void onErrorResponse(VolleyError error) {
                      //Toast.makeText(this,error.toString(),Toast.LENGTH_LONG ).show();
                  }
              }
      ){
  
          protected Map&lt;String,String&gt; getPaaram() throws AuthFailureError {
  
              Map&lt;String,String&gt; map = new HashMap&lt;String, String&gt;();
              map.put(KEY_USERNAME,username);
              map.put(KEY_PASSWORD,Password);
              return map;
          }
      };
  
      RequestQueue requestQueue = Volley.newRequestQueue(this);
      requestQueue.add(stringRequest);
  }
  
  
  private  void callToMenu(){
      Intent menu = new Intent(LoginActivity.this,Inside.class);
      startActivity(menu);
  }
  }
  </code></pre>
  
  <p>My PHP code:
  When I pass values to this PHP page, $password, and $username always null. I can't find what is wrong with my code.</p>
  
  <pre><code>&lt;?php
  require_once('Dbconnect.php');
  $obj = new Dbconnection();
  
   if($_SERVER['REQUEST_METHOD']=='POST'){
  $username = $_POST["username"];
  $password = $_POST["password"];    
  $count  = 0;        
  $sql = "select * from employee where username = '".$username."' and  PASSWORD  ='".$password."'";    
  $result_val = mysqli_query($obj-&gt;getdbconnect(),$sql);    
  while($rs = mysqli_fetch_array($result_val)){    
          $usname = $rs["username"];
  $count++;    
  }
  
  var_dump($username,$password);die;
  if($count&gt;0){
  echo "123";
  }else{
  echo "fail";
  }
  }
  </code></pre>
  
  <p>Thank you</p>