I am looking to understand a good practice for the following situation:
If my profile has some value in the database, for example: 10000
and I want to display in the page You are level "Advanced user" what is the good way of doing this?
if row[user_xp] > 10000 print "You are Advanced user"
and I change this string "Advanced user" according to a value in the database.
Way Two:
Recording another value, that holds this names like "Beginner", "Advanced user", "Pro" and if row[user_xp] > 10000 mysqli_query SET user_level = 2 (where 2 is the number that means "Advanced user")
And then when I display the string level if row[user_level] = 2 print You are $userLevel (that will print string like "You are Advanced user")
As I am very beginner, I think maybe it will depend on my needs to record that value names in the database or not. But I am really not sure for the approach.
Thank you very much for the attention and your replies!