Page 1 of 1

Undefined Index?

Posted: Fri May 16, 2003 12:47 pm
by Jim
Hey folks.

Just quick questions. When I set error reporting to E_ALL, I get the "Undefined Index" error when I use the following:

Code: Select all

$action = $_GET['action']; 

if ($action == 'dothis') { 
// Do this stuff 
}





The url does indeed have the 'action' variable defined as I asked it to. What does that mean, and how can I fix it?

Posted: Fri May 16, 2003 4:47 pm
by cirox
I dont see anything wrong, but you might try renaming the variable.. Action is one of those words that seems like it would be too easy for either the browser or the server to intercept as being default HTTP protocol/HTML language (such as in the form tag.. >form action="bleh" method="get"<, or the http ACTION) so, that's all I know to tell you.