Jump to content

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


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.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.