Hello guys.
I am faced with an serious issue in my current project.
I have this form, when the user submits it I create an array via javascript which is then encoded in with JSONstring.make().
The data is sent to php via ajax, the problem is that sometimes, I havn't found a common denominator, the data is recived and decoded with json_decode and then utf8_decode and when the query is executed all the data is empty. The data is allways correct before it's sent.


Edited by K0ns3rv: n/a

7 Years
Discussion Span
Last Post by diafol

I have found the source of the problem:
The data is sent as a GET parameter to the ajax. I just encountered the error again and noticed that the url is correct like


But after extracting the data using the following code:

$client = stripslashes($_GET['clientData']);
    $data = json_decode($client,true);

as well as utf8_decoding it. I found that it was all empty on the serverside, still havn't found a pattern to why this error occurs

Also in firedebug the parameters for clientData aren't reported.

Edited by K0ns3rv: n/a


We realized that _GET method probably ain't all that good for queries, switched to POST, havn't seen the error yet, but thanks anyways mate.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.