Maybe its late and I'm tired but I don't understand what I'm seeing on
the screen. I have this block of code:
$choiceMade = $_GET["choiceMade "];
if ($simpleMode == "y" && $choiceMade == "") {
startPage();
printEasyContro lPanelOptions() ;
endPage();
} else {
if ($choiceMade) {
$choiceMade();
} else {
printDefaultScr een();
}
}
Normally $choiceMade is handed something from the code and then
executes it. It is supposed to be the name of a function. About an
hour ago it started printing out the seconds, a unix timestamp.
Instead of executing a function, it just prints a time stamp. I
thought perhaps somehow the value of $choiceMade was getting
overwritten by a coookie. That is when I added the line you see at
top, where it grabs the value out of $_GET. I did this to test the
possibility that an errant cookie was screwing things up. However, the
problem persists, though the query string is empty. When the url looks
like this:
mcControlPanel. php
$choiceMade continues to print a timestamp. How is this possible? Why
isn't it blank? It should fail the if() test and print the default
screen, shouldn't it?
the screen. I have this block of code:
$choiceMade = $_GET["choiceMade "];
if ($simpleMode == "y" && $choiceMade == "") {
startPage();
printEasyContro lPanelOptions() ;
endPage();
} else {
if ($choiceMade) {
$choiceMade();
} else {
printDefaultScr een();
}
}
Normally $choiceMade is handed something from the code and then
executes it. It is supposed to be the name of a function. About an
hour ago it started printing out the seconds, a unix timestamp.
Instead of executing a function, it just prints a time stamp. I
thought perhaps somehow the value of $choiceMade was getting
overwritten by a coookie. That is when I added the line you see at
top, where it grabs the value out of $_GET. I did this to test the
possibility that an errant cookie was screwing things up. However, the
problem persists, though the query string is empty. When the url looks
like this:
mcControlPanel. php
$choiceMade continues to print a timestamp. How is this possible? Why
isn't it blank? It should fail the if() test and print the default
screen, shouldn't it?
Comment