I have this problem, it should be easy to solve. But i'm new to PHP so please help.
The problem is :
Profile page doesn't update after update in mySQL database
For example :
1. User edit their profile (e.g. First Name)
2. Click on update.
3. PHP script to update mySQL runs perfectly.
4. First Name in mySQL updated to the new input.
5. The page redirects to profile page.
6. Problem= The first name is the previous first name.
Users need to log out and sign in again to see their new updated first name.
Here is the code to view the first name in the profile page:
echo '<h1>' . $_SESSION['fname'] . '';
Please help. Thank you.