I'm trying to parse some JSON data from this JavaScript code:

Code:
  var purchase, sendDB;
  sendDB = [{"item":"Boots", "price":"100"},   {"item":"Phone", "price":"800"},   {"item":"AK","price":"600"}];

  console.log(sendDB[0].item);

  sendDB = JSON.stringify(sendDB);

  $.post("testFront.php", sendDB, function(r){

    alert("sending purchase data to php.");
    console.log(sendDB);

  });
I'm 99% confident this works since the callback function works. Also since this does involve JavaScript, my apologies if this is the wrong place and if someone could just refer me to the correct ppl.

Anyways, I'm pretty sure it's the PHP code:

PHP Code:
$data file_get_contents("php://input");
print 
$data;
if(
file_get_contents("php://input") == true){
  print 
"TRUE";
}
if(
file_get_contents("php://input") == false){
  print 
"FALSE";
}
if(
file_get_contents("php://input") == NULL){
  print 
"NULL";
}
$purchase json_decode($data);
print 
$purchase
The only print info I get is NULL and FALSE. I've been struggling with this for the better part of a week now. Read a bunch of stuff on it and am still confused, but I am pretty sure it's something stopping the data from going to the PHP. I just don't know what.