A easier or better way of doing this?

el33

New Member
I'm currenty working on a website (which consists of cms with a forum), and I'm wanting to give each user points for doing specific tasks (++ everytime), which should eventually give them a rank.E.g. if the user did a post they'd get 5 points, if the user submitted a thread/topic they'd get 20 points and so on and the ranks would be like if the points are over M and lower then MX they'd be the R rank and so on.M = The minimum points needed to gain the rank.MX = The maximum points needed to gain the rank. R = The Rank (e.g. Beginner, Master etc).Hope all is clear, its a bit like the traditional forum points system where your given points for posts - which would give them a Display Title/Rank.I'm currently storing the points within a MySQL DB, and assigning a Rank via PHP with if statements like so:\[code\]if ($points > 0 && < 100) { $rank = 'Beginner'; } \[/code\]Is their some sort of class, library, function, formula, method; you can suggest which could make this easier, or a better way you can think of?Cheers!
 
Back
Top