so i have a gigantic javascript object that i want to pass it on to PHP.
What i'm trying is: - use stringify to put it as the value of a hidden field - hit submit
In PHP, if I
echo $_POST['hidden']
the JSON string seems perfect, but when i use
json_decode($_POST['hidden'])
i get NULL
If i use jQuery's
$.post
, i get exactly the desired result: i am able to use json_decode on it.
Can someone explain to me what i'm doing wrong? thanks