I have a PHP form where users enter their health data after signing up to the website and then it calculates the BMI once the user register and stores the BMI in the database and then passes this BMI to be displayed on another PHP page, however, what I want to do is to display this BMI when the user login to the website, can I use session in this case or should I get the BMI from the database?
Your login system should only store the user id (autoincrement primary index) in a session variable to indicate who the logged in user is. You should query on each page request to get any other user data, such as a username, permissions, or for what you are asking, a stored BMI value.