This appears to be a register globals problem....
replace "switch($select)" with "switch($_GET['select'])".
For information on register globals and why it has been turned off in later
releases see this pagee:
There is nothing syntactically wrong with the switch statment you are just
refering to an non-existant variable... I imaginge this came from an
outdated book or tutorial.
"Edward Kehoe" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Ok...I just recently installed Apache1 and PHP 4.2.3 on my computer and
> configured everything. However, I can't seem to get my switch statements
> accept variable values from the address bar. So if I type in:
> It displays the text in the default part of the switch statement. I also
> seem to get the following error message every time:
> Notice: Undefined variable: select in c:\apache\apache\htdocs\index.php on
> line 51
> Here's the code for my switch statement as well:
> case 1: print "About Stuff Goes Here.";
> case 2: print "Music Goes Here.";
> default:print "Testing...";
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php