Sorry, I should have explained everything more clearly. 🙁
The way I have it set up, each page(or article) has a Category and ID number. Example:
index.php?Category=Home&ID=1 // Home Page
index.php?Category=About_Us&ID=1 // First Article in About_Us category - So happens to be "History"
index.php?Category=About_Us&ID=2 // Second Article in About_Us - "Civic Involvement"
index.php?Category=Services&ID=1 // First Article in Services category
So on an so forth. The index.php calls the content from a table in my mysql database using the category and ID to find it. For this reason, the ID # must remain in tact. If the category or ID is not set, I have instructed the the category to default to Home and ID to default to 1, that way there will always be a category and ID for every page.
Since I had this identification system implemented, I just used the same variables. For example - according the the permissions.php, registered users have the edit button displayed if the session is set to Registered AND $Category is equal to Services. The $category will only equal services when they are viewing an article in the services category (obviously).
(This is the code at the top to check if the session is set to registered: )
if (isset($_SESSION['registered'])
|| $_SESSION['registered'] == true) {
$login = registered;
}
I should have fully explained everything before posting- apologies! Thanks again for your help, It is much appreciated