undefined index mode, which is the variable that case statement is looking for
- by Brad
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?