title: PHP website user XP and levelling system
body: <p>So I have a members website written in PHP and MYSQL. </p>
  
  <p>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.</p>
  
  <p>When someone joins it will auto be at lv 1. Now say it lv x 2 for XP to level up per time;</p>
  
  <p>lv1 = 2 xp
  lv2 = 4 xp
  lv3 = 6xp
  lv4 = 8xp</p>
  
  <p>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?</p>