Sign in to follow this  

Ajax inside phaser not working

Recommended Posts


I'm just trying to get a simple ajax function to work inside phaser just to play around with it. But I can't seem to get it to work. 

The function is just supposed to send two variables to PHP and get back a sentence where those two variables are part of it. But I only get the basic sentence back. And I have tried to use the function outside phaser with just an onclick bottom function, and their it works fine. So it must have something to do with phaser. 

heres the code in phaser 



And here is the php 


I have a sprite where i use the 


function. But i only get 




While when i just use a botton in html and plane javascript i get 






Share this post

Link to post
Share on other sites

Just remove this topic, the problem was with visual code. for some reason, it had not saved some changes in the PHP file even though it claims that the file was saved.  

Might have something to do with have to files with the same name, located to different places, messing up the save function i don't know. But everything works fine now, and it had nothing to do with phaser 

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.