I've got a points system in a social media script, and I'm trying to get it so that when a user makes a post, it's adds a point to their account. The points is basically a column in my "profiles" table called "totalpoints".
I've got a basic code which doesn't exactly work, but the code does call the action. So I know that my update code is not right, but I cannot work out what. So here is what it is:
$totalpoints = "UPDATE profiles SET totalpoints = totalpoints + 5 WHERE name = '$name'";
Any help from anyone would be appreciated.
Thanks