A easier or better way of doing this?
<p>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.</p>

<p>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.</p>

<p>M = The minimum points needed to gain the rank.</p>

<p>MX = The maximum points needed to gain the rank. </p>

<p>R = The Rank (e.g. Beginner, Master etc).</p>

<p>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.</p>

<p>I'm currently storing the points within a MySQL DB, and assigning a Rank via PHP with if statements like so:</p>

<pre><code>if ($points &gt; 0 &amp;&amp; &lt; 100) {  
    $rank = 'Beginner';  
}  
</code></pre>

<p>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?</p>

<p>Cheers!</p>
