(SOLVED!) PHP + MySQL Login for Includes

I apologize in advanced if this has been answered a billion times. I simply don't know how what keywords to use to find the answer.

I am creating a login system for a website I have created using PHP and MySQL. The database end I have already done and everything is working.

Here is my problem. My website works with includes. Basically I have index.php which is my template and I work off of id's to call the pages into the body of that page. (ie: index.php?id=about, index.php?id=admin, etc.)

My admin page (admin.php) has this on top, as instructed by login tutorials

The easiest way I see to solve this is to create another template file for all my admin pages and then include each respective page into that one, but is there a way to do this without those extra steps?

I really hope someone understands my question and once again I apologize if it has been answered many, many times. I literally have run out of search keywords to find what I am truly looking for.