What you're asking is really more a statistics question than a programming one.
You want each user to have a chance to win proportional to the number of entries they made ("points"). In the real world, this is the equivalent of putting each user's name into a hat once for each point they get, then drawing one name at random. The single drawing names the winner.
Programmatically, you do this by choosing a random number between zero and the total number of points awarded across all users minus one (you could, if you wish, start at one. But computers use zero and that's generally easier). Then you iterate through the users, adding each one's point total to a running sum. When the running count exceeds the random number you've chosen, the user you're currently on has won.
Imagine you have three entrants, named Joe, Bob, and Alice:
Name Points
------------
Joe 3
Bob 8
Alice 2
It doesn't matter what order the names are in, the probabilities will work anyhow.
You select a random number between zero and 12 inclusive (12=3+8+2-1). On a 0-2, Joe wins (2=3-1). On a 3-10, Bob wins (10=8+3-1). On an 11-12, Alice wins (12=3+8+2-1). Note that the number of values included in each range is equal to the number of points - thus, the odds of a given individual being selected are (individual's points / total points), the logic you desire.
The way you check the winner is as I said above - start a sum at zero, then add 3. If 3 > randomvalue, Joe wins. Then add 8 to that. If the new 11 is greater than the random value, Bob wins. Then add 2. Now the number is greater than your random value (since 13 is higher than the max you could generate).
This could, in theory, be done in a database - but it's not really an appropriate task there. This is application logic, and I'd recommend doing it in PHP (the SQL would just be a basic SELECT
of all the users, their points, and perhaps the point total).