undefined constant?

From: Date: Mon, 06 Jan 2003 11:44:02 +0000
Subject: undefined constant?
Groups: php.general 
Request: Send a blank email to php-general+get-130386@lists.php.net to get a copy of this message
If have this piece of code (test.php): <? if($_GET[test] == "test") { echo "A"; } else { echo "B"; } ?> I open the file in my browser like this: localhost/test.php?test=test and get this page: Notice: Use of undefined constant test - assumed 'test' in c:\programfiler\apache group\apache\htdocs\test.php on line 2 A Do I need to define test? How can I work around this annoying notice? Forgive me for my ignorance.

« previous php.general (#130386) next »