ok, but how do i define it?
You must define nothing...:
1) External GET-variables will not automatically import to the global scope. So you have no $action, but you have $_GET['action'].
Ok, you can assign a external variable to a global one with
- Code: Select all
$action = $_GET['action'];
and then work with $action in your code.
2) $_GET is a array like every other array too and you can make the same things with it.
- Code: Select all
if (isset($action) && $action == 'folder') {
This should be:
- Code: Select all
if (isset($_GET['action']) && ($_GET['action'] == 'folder')) {
You see, no need to import the external variable, you can work diretly with it in this simple case.