title: Send data to server with Volley Lib in Android
body: <p>I've developed a Application that i'm going to send data from the phone to the server by <code>Json</code>, to do this i use <strong><code>Volley</code></strong> Library in Android.<br>
  but i can not send data to the server!</p>
  
  <p>my simple php code : </p>
  
  <pre><code>$name = $_GET["name"];
  $j = array('name' =&gt;$name);
  echo json_encode($j);
  </code></pre>
  
  <p>my java code : </p>
  
  <pre><code>private void makeJsonObjectRequest() {
          mRequestQueue = Volley.newRequestQueue(this);
          String url = "http://my-site-name/sampleGET.php";
  
          StringRequest jsonObjReq = new StringRequest(Request.Method.GET, url,
                  new Response.Listener&lt;String&gt;() {
                      @Override
                      public void onResponse(String response) {
                          Log.d("result:", response);
                          Toast.makeText(getApplicationContext(), response, Toast.LENGTH_SHORT).show();
                      }
                  }, new Response.ErrorListener() {
  
              @Override
              public void onErrorResponse(VolleyError error) {
                  VolleyLog.d("err", "Error: " + error.getMessage());
                  makeJsonObjectRequest();
              }
          }) {
              @Override
              protected Map&lt;String, String&gt; getParams() {
                  Map&lt;String, String&gt; params = new HashMap&lt;&gt;();
                  params.put("name", "json");
                  return params;
              }
          };
          mRequestQueue.add(jsonObjReq);
      }
  </code></pre>
  
  <p>It also got help from the link below : <a href="https://stackoverflow.com/questions/25948191/send-post-request-using-volley-and-receive-in-php">Click to see link</a></p>
  
  <p>But still could not use it and send data from mobile to server!!!<br>
  How can I do this?
  Please give me correct and how to use it</p>