Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Mar 13th, 2007, 9:54 AM   #1
Fex2005_uk
Newbie
 
Join Date: Mar 2007
Posts: 3
Rep Power: 0 Fex2005_uk is on a distinguished road
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
Fex2005_uk is offline   Reply With Quote
Old Mar 13th, 2007, 11:49 AM   #2
Wizard1988
Professional Programmer
 
Wizard1988's Avatar
 
Join Date: Oct 2005
Location: Chitown
Posts: 417
Rep Power: 4 Wizard1988 is on a distinguished road
Send a message via AIM to Wizard1988
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.
__________________
JG-Webdesign
Wizard1988 is offline   Reply With Quote
Old Mar 14th, 2007, 4:18 AM   #3
Fex2005_uk
Newbie
 
Join Date: Mar 2007
Posts: 3
Rep Power: 0 Fex2005_uk is on a distinguished road
:banana: Thanks, so simple.

Ill get straight onto this.
Fex2005_uk is offline   Reply With Quote
Old Mar 20th, 2007, 10:07 AM   #4
kruptof
Professional Programmer
 
kruptof's Avatar
 
Join Date: May 2006
Location: UK - London
Posts: 330
Rep Power: 3 kruptof is on a distinguished road
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)
__________________
Quote:
When I was young it seemed that life was so wonderful,a miracle, oh it was beautiful, magical.
Now watch what you say or they'll be calling you a radical,a liberal, oh fanatical, criminal. Oh won't you sign up your name,we'd like to feel you're acceptable, respectable, oh presentable, a vegetable
kruptof is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to meet these cross-platform project goals? mattengland C++ 1 Apr 3rd, 2006 4:01 AM
PHP system commands ktsirig PHP 6 Oct 4th, 2005 1:24 AM
system () command in Borland C++ Bldr. 4 L7Sqr C++ 14 Jun 18th, 2005 8:15 PM
System Info Da-Kid C++ 9 Feb 15th, 2005 6:46 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 2:57 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC