PHP Highscores

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
tomsace
Forum Contributor
Posts: 167
Joined: Thu Jan 01, 2009 8:07 pm

PHP Highscores

Post by tomsace »

Hey,

I have my own flash game I have made, I understand how to save my users highscores to a mysql database using php etc.. But the thing I wanted to know was how can I store my users 'name' as there vbulletin username?

Im sorry but I didn't know where to post my question, and I am only signed up to this site for coding help...

Anyway I am using this code to store the users high scores:

Code: Select all

_root.add_pass = "{same as $pass in _data.php}";
 _root.name = _root.variableYouUsedInTheGameForThePlayersName;
 _root.score = _root.variableYouUsedInTheGameForThePlayersScore;
 getURL("new_score.php", "", "POST");
 
I am guessing the "_root.variableYouUsedInTheGameForThePlayersName" is where the code will be placed, but just didnt know what to put for the vbulletin username to be processed??

Thanks in advance,
Tom.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Re: PHP Highscores

Post by JAB Creations »

If you've got a legit vBulletin license then you no doubt have access to a vBulletin specific MySQL database. All you need to do is JOIN the table with the scores and whatever table has the ID's associated with the forum user's names. I'd recommend asking on the vBulletin support forum which table it is if you are unable to find it yourself.
Post Reply