I have a utilities.inc.php file that I put the following code in:
// Check for a user in the session:
$user = (isset($_SESSION['user'])) ? $_SESSION['user'] : NULL;
along with my connection settings and what have you. Though it could go into a connection.php I guess.
That way all you have to do something like:
$_SESSION['user'] = $row->User_Name;