Page 1 of 1

PHP Highscores

Posted: Sat Mar 21, 2009 12:30 pm
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.

Re: PHP Highscores

Posted: Sun Mar 22, 2009 4:06 am
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.