You'll want to write a bridge that makes use of the session handling functionality of the forum software. I assume you are actually sharing whatever the user table is that correct?
Effectively, the sessions need to match something that phpbb understands. I don't use phpbb and don't know their structure, but they likely have a separate handling file just for its sessions. You want to make use of that in your home page to bridge the forum software to your software.
As of PHP 5.5, the MySQL library has been officially deprecated. It is recommended to move to either MySQLi or PDO libraries for your mysql connectivity. See here for help choosing which interface you prefer: http://php.net/manual/en/mysqlinfo.api.choosing.php