Question:

How can i integrate a php point system for my website?

by  |  earlier

0 LIKES UnLike

Hello. I'd just like to know how i'd be able to add a point system to my website. I already have a mysql database and have user sign in / register set up. I just need to know how to add a point system in which users start with 100 points and it costs a certain amount of points to upload / dlownload a file. Can i get a free php script for this?

How do i configure a point system in the mysql section? Thanks.

 Tags:

   Report

2 ANSWERS


  1. If you are using a forum/cms software like phpbb or something like that you can find free plugins for it if you go to the official site.


  2. You can add a points table to your database, something like:

    tblPoints

    pointsID // unique row

    userID // unique user

    totalpoints // total points

    Whenever a user performs a specified action (such as logging in or signing up) you will update their row in the points table. Something like:

    UPDATE tblPoints SET totalpoints = 100 WHERE userID = 1

    This example will set the total number of points to 100 for user 1.

    Then to display how many points a specific user has:

    SELECT totalpoints FROM tblPoints WHERE userID = 1

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.