There is SESSION variable declared on the login page and when I try to echo it on the other (admin_lounge.php) page, it is working perfectly.
---
Problem
1. I want to fetch the firstname from the database based on who is logging in.
2. Then echo it on the next page.
3. Not working.

The code I am trying to use is as follows -
$salman = $_SESSION['MM_Username']; mysql_select_db($database_brn_system, $brn_system); $query_rsPilot = "SELECT pilots.firstname, FROM pilots WHERE pilots.pilot_callsign = '$salman'"; $rsPilot = mysql_query($query_rsPilot, $brn_system) or die(mysql_error()); $row_rsPilot = mysql_fetch_assoc($rsPilot); session_register('firstname'); $_SESSION['firstname'] = $row_rspilot['firstname'];
---
Please help.