You are loging them into checkcorplogin.php and then sending them to a new page corparea.php that they are not logged into.
For every page that loads you must have some form of verifying who they are, hence the usage of sessions. The $_SESSION['myusername'] stores their user name. And every page that loads must check that information and see if it is valid and then preform actions based on wether it is valid or not.
This isn't quite the same as the login validation as you are not checking to see if there information is correct. All that is need is for you to check that the $_SESSION['myusername'] is set
if(isset($_SESSION['myusername']){
//open the table and retrieve related data
{
I usualy also store user permisions in the $_SESSIONS[] array and then load various other parts of the page if they have the correct user permissions as it corespondese to those other parts. That is a bit more advanced than what you are doing but it gives you some of idea of your options.
To avoid alot of duplicate code I recomend that you build the code for checking the $_SESSIONS[] information and just make it an include at the top of every page. It is usually a good idea to start your session in that include as well you can open your database there as all that needs to be done for every page that loads.