Bug when I use AJAX POST?? I didn't find any solution, help

Discussion and feedback on Construct 2

Post » Thu Nov 06, 2014 9:16 pm

hi all, when I try to send a data with "POST" method to a php file, like:

URL:"phpfile/MAKEJSON.php"
DATA: "c2array="&myarray.AsJSON

my php file will write a new file:

$myfile = fopen("users/$id/$namesavegame.json", "w") or die("Unable to open file!");
fwrite($myfile, $c2array);
fclose($myfile);


and this work, the problem is a result of the json file:

{\"c2array\":true,\"size\":[412,5,1],\"data\":[[

you can see, "\", and i don't find any solution about this, I don't understand why "\" will appear...

with GET is working good, ( {"c2array":true,"size":[412,5,1],"data":[[) but I need to use POST....is a bug?

thank you very much... I don't know how to solve this problem...
B
21
S
9
Posts: 298
Reputation: 2,967

Return to Construct 2 General

Who is online

Users browsing this forum: David181 and 8 guests