1.) Simply check if the user is currently logged in via a SESSION.
2.) In the DB. Simply add points to the column with an UPDATE as you go.
3.) Same as 1. If/Then are basic items which create the entire life/design of the site. That's always the question/deciding factor, if this, then that.
4.) (Unsure on the percentage matching)
5.) Google usually helps great with this. Here's 3 listings from a quick Google search:
php - How to efficiently find the closest locations nearby a given location - Stack Overflow
PHP/MySQL: Select locations close to a given location from DB - Stack Overflow
Last edited by Triple_Nothing; May 27th, 2015 at 07:04 AM.
He who knows not that he knows not is a fool, ignore him. He who knows that he knows not is ignorant, teach him. He who knows not that he knows is asleep, awaken him. He who knows that he knows is a leader, follow him.