Jump to content

calling a number from a database, and displaying the new number without refresh


cloudll

Recommended Posts

Hi guys, I am very new to ajax and was wondering if someone could maybe point me in the right place to learn what i need to reach my goal.

 

I currently have an image on my website, a character for a game, the image is positioned using absolute positioning. The pixel placement for the image is stored in a mysql database.

 

I then have a compass, when someone for example clicks north, it loads north.php which adds 30 to the database, changing the aboslute position, and redirects back to the game, with my little character now 30 pixels higher than before.

 

It works fine how it is, but someone has brought it to my attention, that using ajax, I could make it so when i click north, it will update my database +30 and apply the changes to the position of my character without having to refresh the page once.

 

Would anyone know what this feature of ajax is called? or be able to recommend some tutorials that may help with this?

 

Thanks for any tips.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.