undefined index mode, which is the variable that case statement is looking for
Posted
by Brad
on Stack Overflow
See other posts from Stack Overflow
or by Brad
Published on 2010-05-17T15:10:38Z
Indexed on
2010/05/17
15:20 UTC
Read the original article
Hit count: 149
php
receiving error: PHP Notice: Undefined index: mode in /web/ee_web/include/form-modal.php on line 51
line 51
switch($_GET["mode"]) {
block of code it is in:
switch($_GET["mode"]) {
case "login":
login_user();
break;
case "logout":
session_destroy();
print "<p>You are now logged out.</p>";
print "<p><input type=\"submit\" id=\"closeButton\" name=\"closeButton\" value=\"Close\" onclick=\"self.parent.tb_remove(); parent.location.reload(1);\" /></p>";
break;
default:
login_user();
//print "<p>How'd you end up here?</p>";
break;
}
The URL for the page is index.php?mode=logout, that is how I am passing the value into mode.
Any way I could resolve this error message?
© Stack Overflow or respective owner