title: Troubleshooting PHP $_POST from Android Studio
body: <p>thanks in advance for your time. Here is the situation:</p>
  
  <p>I am trying to post some data from my Android application. First, consider my PHP code (the login credentials are correct, trust me :D)
      <div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  $db_name = "op-users";
  $mysql_username = "******";
  $mysql_password = "******";
  $server_name = "***.***.***.***";
  
  $con = mysqli_connect($server_name, $mysql_username, $mysql_password,
  $db_name);
  
  $username = $_POST["username"];
  $password = $_POST["password"];
  $email = $_POST["email"];
  
  $statement = mysqli_prepare($con, "INSERT INTO users (username, password,
  email) VALUES (?, ?, ?)");
  mysqli_stmt_bind_param($statement, "sss", $username, $password, $email);
  mysqli_stmt_execute($statement);
  
  $response = array();
  $response["success"] = true;
  
  echo json_encode($response);
  ?&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Critically, when I <em>hardcode</em> in values for $username, $password, and $email, it works perfectly, entering those values into my database. This would seem to indicate that this PHP is working as intended, but not receiving the values from the $_POST statements.</p>
  
  <p>Consider also the following Wireshark capture, where it is seen that my app is in fact sending out the POST information.
  <a href="http://i.stack.imgur.com/jFNsF.png" rel="nofollow">WIRESHARK CAPTURE</a></p>
  
  <p>In sum, the PHP works, but doesn't seem to be receiving the POST requests. The app sends the POST data, but the PHP page isn't picking up on the posted data. By the way, I know the app is successfully contacting register.php because as I said, when I would hardcode in the values, registering on the app would cause the hardcoded values to be saved to the databse. </p>
  
  <p>Can anybody recommend a troubleshooting avenue? Thanks!</p>