View Single Post
  #1 (permalink)  
Old Dec 8th, 2007, 16:35
longstand longstand is offline
Reputable Member
Join Date: Oct 2007
Location: Liverpool UK
Age: 29
Posts: 216
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Session data problem

Hello all!

I have created a php page called your_account.php ! Now once the registered user logs in successfully they are transfered to the page mentioned above & there data information is automatically loaded from the database into the your_account page! Now everythink is working fine the data is loading into the page fine, the problem i have is the persons data who registered first seems to load even when anouher user logs in with a diffrent password & username! So no matter which registered user logs in, the same user data loads.

The data that continuesly loads no matter who loags in is the first persons data who registered on the site! Very confusing

.................................................. .................................................. .......

I have used session code found below and i have a feeling that if a seesion starts when someone logs in, the session is meant to terminate once they leave the site, i think my code is possibly incomplete, could anyone offer any advice??

Cheers..

Below is the session code:

PHP: Select all

// check if session exists and assing it to a variable
if (!isset($_SESSION)) {
session_start();
}
// we can populate the session MM_Username because it is a unique identifier
if (isset($_SESSION['MM_Username'])) {
$username $_SESSION['MM_Username'];

Attached is my php file

Thanks
Attached Files
File Type: php your_account.php (32.2 KB, 3 views)
Reply With Quote