I use the session code below in my edit profile page & the logged in users data loads into the page with no problems.
- PHP: Select all
if (!isset($_SESSION)) {
session_start();
}
if (isset($_SESSION['MM_Username'])) {
$username = $_SESSION['MM_Username'];
}
My question is: When the user who visits my website logs in, they are directod automatically to there profile page, but there data does not display in the page even after adding the code above. The closest i have got is it only displays the first registerd user in the database in the page, no matter which password & user name is input at the login page. Have you any ideas why this happens???
Also is the session code above the right code to use in my profile page to help tackle this problem of mine??
Thanks mate