And, of course, showing them their stats is all well and good. But there also needs to be an easy way to update a stat.
Here is the php code for that as well...Here
Then ensure it updates the stats in the game to show the new stat score.
Mouse -> on right button clicks on object 1 -> Ajax -> Post to : "http://localhost/wwxmmo/addexp.php?username="& UsernameTxt.Text & "&password=" & PasswordTxt.Text (tag "addexp")
Ajax->On "addexp" completed -> Ajax ->Request: "http://localhost/wwxmmo/getstats.php?username="& user
Ajax-> On "getstats" completed -> [Text]stat1 -> Set text to Ajax.Lastdata
Simple as that. The user clicks on an object, our game Posts a command to php. Php updates the database. When the ajax command finishes a request is sent to retrieve the updated stat from the database, we assign that stat to a text object and the new stat is then displayed in the game.