![]() |
Custom Leaderboard/Score system
Hi
Im new to PHP and Im stumped on how to create a leaderboard and score system for my site. Im planning on having over 100 puzzles on my site, when a member finishes each one they will get a code. Then the member will click on "submit score" on his profile, and submit the supplied code. The points would then be instantly added to the members overall score. The more puzzles the member completes the higher theire score. Does anyone know of any pre-made scritpts that could be easily modified to suit this? Or anyone prepered to point me in the right direction on how to programme such a beast? Im assuming that the syatem will use a SQL database (over flat-file) and im assuming that I will need to have some type of cookie to stop the same user entering the same information twice. I would like to be able to display all users in a leaderboard (or at least the top 25 players). ANY help would be a big advantage! Regards Adam Check out my site at www.Follow-me.co.uk |
Cookies can be deleated. You should store their key code in a table with their information. When they submit their key you would check if it already exists in the table if so then its a repeat. I think you would avoid a problem of them entering the key twice if the games submited the scores themselves.
|
:banana: Thanks, so simple.
Ill get straight onto this. |
I just saw this post in the jobs and kind of triggered my memory because I remembered I saw this post before, so here is some information, hope it helps.
If the game does not rely on some sort of timer then I think you can just allow users to register and once they register they can play the games, so when a user clicks on a game to play check your DB to see if they haven't played this game before and when they user submits a game update your records so that you know that this user has played this game, do the answer and other verification on the server end.(It would be kind of pointless to register and play a game just once, maybe you should let them play more than once and just accept their last score) for the leader board, once the user submits the game, give them a correct a score for each question they get right, and at the end once you have finished marking them at the same time you are updating your DB also include their score, you can have this (the score) either in the same table as the users information or in a separate table, so when you want to display the score board just read the data from the score table (or field) and then output that. What you’re asking for it seems straight forward, because it’s just a matter of the reading data from a sent form and then comparing that data to some other data (and also check for malicious content in the form submitted) |
| All times are GMT -5. The time now is 2:26 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC