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

0 favourites
  • 1 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • hi all, when I try to send a data with "POST" method to a php file, like:


    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);


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

    {[/b]"c2array[/b]":true,[/b]"size[/b]":[412,5,1],[/b]"data[/b]":[[ you can see, "\", and i don't find any solution about this, I don't understand why "[/b]" 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...

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)