Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4117292
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T22:49:00+00:00 2026-05-20T22:49:00+00:00

So I have a members website written in PHP and MYSQL. Say for a

  • 0

So I have a members website written in PHP and MYSQL.

Say for a second I want to let my users level up as a reward system and they get XP from doing certain things on the site like posting and what not. Giving the XP is the easy bit, the bit I am kinda stuck on is how the levelling will actually work.

When someone joins it will auto be at lv 1. Now say it lv x 2 for XP to level up per time;

lv1 = 2 xp
lv2 = 4 xp
lv3 = 6xp
lv4 = 8xp

How do I factor this into a formula, so when the XP is reached it will for the certain LV it will level the user up and double the amount of XP needed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T22:49:01+00:00Added an answer on May 20, 2026 at 10:49 pm

    formulas:
    your sample:

    //level => required XP to reach it 1 => 0; 2=>2; 3=>6; 4=>8....
    $xpForNextLevel = ($currentLevel)*2;
    

    Double required xp after each level

    //level => required XP to reach it 1 => 0; 2=>2; 3=>4; 4=>8; 5=>16; 6=>32....
    $xpForNextLevel = pow(2,$currentLevel);
    

    EDIT:
    Where $xpForNextLevel is the total amount of xp required to reach the next level, NOT the difference betwean this level and the next.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a website that has members. I want to create a feature that
I have a members only website in which the logged in users fill in
Okay, so here's my problem: I have a list of members on a website,
I have a members table in MySQL CREATE TABLE `members` ( `id` int(10) unsigned
I have a database of about 700k users along with items they have watched/listened
I have 2 websites with a member login system. Members are registered at one
I have a small website with about 10 members. 5 of those are now
Lets say I have a website with a small application that lists the 10
I have a page where I display a friends list from my website members.
Hi im am trying to allow users to be members in a website. The

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.