Jump to content

Variable breaks page!?[SOLVED]


Perad

Recommended Posts

It makes no sense and frankly its pissing me off.

My script contains a several functions within the main function. It is controlled by a switch statement. There are 3 switch statements allowing 3 levels of access. Admin, loggedin and Guest

The admin level of the script doesn't work because whenever i put the $adminaccess variable into my main function the script stops working. When i say stopped working i mean the switch statement just decides to switch to default... Its so annoying as i have an almost identical script working perfectly on another page.

On the main php page i have included the viewadminpanel script which has got the  adminaccess function declared on it.

Does anyone know why the script stops fucntioning when i add "global $adminaccess;" to the loggedinnews function?

loggedinnews function

Was the switch statement...
Link to comment
https://forums.phpfreaks.com/topic/28075-variable-breaks-pagesolved/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.