I’m trying to post my formdata to another page, using JSON. I want to simply get my values at this stage. i’ll do some checks and return an object at the end which will include a status with true or false depending if my data is okay (registration form)
Here is my JS (currently logging text to see what’s printed)
https://jsfiddle.net/b6Ls7f2c/
My PHP code looks like this but I can’t echo a response
header('Content-Type: application/json; charset=utf-8');
$post = file_get_contents('php://input');
echo $post[0][1];