AJAX - Sending two variables together to a php script

0 favourites
From the Asset Store
Easily store, modify, read and manipulate colors with Color Variables!
  • How would i go about doing this? Do i need to open a web browser for each time i update the balance? My intention was to do it from ajax.

    I was thinking to send 2 calls after each other to the server but then it can't really check if the email from the game matches the matches the email in the databse and then update the balance accordingly.

    Can i ask if anyone here can replicate what i'm doing by sending 2 variables from ajax and try to update the user and see if you manage?

    Regards

    Edgar

  • >

    How would i go about doing this? Do i need to open a web browser for each time i update the balance? My intention was to do it from ajax.

    I was thinking to send 2 calls after each other to the server but then it can't really check if the email from the game matches the matches the email in the databse and then update the balance accordingly.

    Can i ask if anyone here can replicate what i'm doing by sending 2 variables from ajax and try to update the user and see if you manage?

    Regards

    Edgar

    Edgar, I used browser just to log the request to see if the expression was right.

    Look, I have a HTTP server running... give me 5 minutes I will replicate to see what happens.

  • Great, thank you.

    Regards

    Edgar

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Its not working.. haha

    I will try again later.. gotta go, lunch time.

  • Its not working.. haha

    I will try again later.. gotta go, lunch time.

    Ok, thanks for trying.

    So then it might be an issue with ajax passing two variables together.

    Anyone else able to replicate this or know if it's actually possible to do this?

    Regards

    Edgar

  • OK..

    Got it working now..

    I dont know why it changed the color on the img..

    PS: email and balance are both global variables.. Probably also works using a textbox.text

  • OK..

    Got it working now..

    Thank you, me too. I missed one of the '&' in the second variable.

    Thank you to everyone who helped.

    Regards

    Edgar

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)