Hi there everyone,
I'm trying to clean up my code, and I've done really well so far in being able to get rid of all the errors, but there's one that I don't know how to get rid of:
In my admin section, I created actions(with the help of this forum), so if I wanted to edit, the url looked like "index.php?action=edit" and so forth. If there was no action attached to the url, it does the default action.
the problem is, when no action attached to the URL, I get an error that "action is not defined".
Is there a way to prohibit this from happening, or is this concidered an acceptable error?
This is the way I'm using the actions:
switch ($_GET['action']) {
case "waiting" :
Lots of stuff
break;
case "approved" :
Lots of stuff
break;
default :
}
and this is the error I get when I don't define an action via the URL:
Notice: Undefined index: action in /path/to/automonial/admin/index.php on line 91
Any help would be greatly appreciated.
thanks,
json