title: Android Volley posting empty string to php
body: <p>I m using Volley by including it in the gradle dependency as</p>
  
  <pre><code>compile 'com.android.volley:volley:1.0.0'
  </code></pre>
  
  <p>Now I m posting a string like this</p>
  
  <pre><code>word = "{\"question\":\""+answer+"\", \"option\":\""+choice+"\"}";
  </code></pre>
  
  <p>in the request parameters as</p>
  
  <pre><code>@Override
          protected Map&lt;String, String&gt; getParams() throws AuthFailureError {
              Map&lt;String, String&gt; params = new HashMap&lt;String, String&gt;();
              params.put("word", word);
              params.put("uid", String.valueOf(user_id));
              return params;
          }
  </code></pre>
  
  <p>This worked for me for 20 days without any complaints. But suddenly from yesterday users are posting empty string.I checked in the php that <code>$_POST['word']</code> is indeed empty. I thought users might be typing double quotes in their input, but this is also not the case as i tested with input without double quotes.This same string I posted using <strong>AsyncHttpResponseHandler</strong> by compiling  <code>compile 'com.loopj.android:android-async-http:1.4.9'</code> and it works. This is baffling me. How can a library which works for some days and suddenly stops working for the same input. </p>
  
  <p><strong>Issue Resolved</strong>
  The issue was this: If i recieve the post as simply <code>$word = $_POST['word'];</code> i get a valid Json Object and if i recieve as <code>$word = $mysqli-&gt;real_escape_string($_POST['word']);</code> i get invalid Json Object with escape characters. I had modified the code to latter on a complaint of a user while the issue was his network connectivity. </p>