drakth's Forum Posts

  • 7 posts
  • Ahhh, so dumb!

    Yeah it was that.

    Thank you both!

  • Well, im new at c2... but this is starting to look more like a bug?

    I found out that if i do this it works:

    http://imgur.com/a/T3eeY

    However if i fill the data field with anything and adjust the URL field accordingly it just doesnt work...

  • Well, everything seems ok to me in the network tab, so i have no idea whats going on <img src="{SMILIES_PATH}/icon_neutral.gif" alt=":|" title="Neutral">

    Network Tab: http://imgur.com/a/o2SSV

  • Hello,

    Removing the question mark didnt seem to do anything <img src="{SMILIES_PATH}/icon_e_sad.gif" alt=":(" title="Sad">

    Im not using Ajax.LastData, im not sure what is it for... that said, im not trying to retrieve anything yet im just trying to click on a button in my "game" and create an entry in my database table in the webserver...

    This is what i see on the console http://imgur.com/a/cw5RT

  • Hi,

    Yeah, i tried adding that also tried uploading it to my webserver and its still showing up empty.

    This is the PHP File: http://imgur.com/a/oeVfb

    This is from construct: http://imgur.com/a/pUGxL and http://imgur.com/a/tI0mZ

    This is the DB: http://imgur.com/a/avG5z

    Thank you!

  • Hello Lennaert,

    I modified the data field.

    What do you mean the access control in the PHP file? I thought that was added in construct.

    What i did was to add a "Set request header" with:

    Header: "Access-Control-Allow-Origin"

    Value: "*"

    How would that go in a PHP file?

    Edit: Now i dont see a message error anymore in the console, but still doesnt update the value.

    Edit: Even if i export and upload the "game" to my webserver i still get the same results

    Thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello everyone,

    I'm starting to play with AJAX, so i added a text to behave as a button, then on the "On Click" i fire a AJAX action "POST TO URL" to a PHP file in my web server, the PHP file simply adds an entry in a database table.

    After clicking the button i go to see the table and i see a new registry is created but the field is empty.

    Set request header

    Header: "Access-Control-Allow-Origin"

    VALUE: "*"

    The post to url parameters are:

    TAG: "UUID"

    URL: "http://www.myserver.com/test/prueba.php"

    DATA: "lala"

    Method: "POST"

    if i execute the php file from the browser it adds the value just fine, for example:

    http://www.myserver.com/test/prueba.php?UUID=lolo

    Could anyone advise?

    Thank you.

  • 7 posts