Jump to content
MakeWebGames

Undefined index errors


Recommended Posts

Posted

Notice: Undefined index: action in C:\wamp\www\xxx\xxx\file.php on line 24

 

I know the error is coming from $_GET['action'] being empty during the first view of the file.

So my question is....

 

Is there a way around this other than ditching the switch function and creating separate files for each case of the switch?

 

I tried this but of course still get the error...

if(!$_GET['action'])
{
	$_GET['action'] = "default";
}
Posted

That too Bertrand. Developing with error reporting set to ALL.

Thought it could improve my coding quite a bit if I try to get rid of all types of errors.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...