Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 794863
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T22:23:00+00:00 2026-05-14T22:23:00+00:00

receiving error: PHP Notice: Undefined index: mode in /web/ee_web/include/form-modal.php on line 51 line 51

  • 0

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?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T22:23:01+00:00Added an answer on May 14, 2026 at 10:23 pm

    I would give a default value for it:

    if (!isset($_GET['mode']) $_GET['mode'] = "login";
    
    switch($_GET["mode"]) {
    
        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;
    
        case "login" :    
        default:
    
        login_user();
        //print "<p>How'd you end up here?</p>";
        break;
    }
    

    Plus, instead of duplicating the code for case 'login': and default: you can put them together like that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 500k
  • Answers 500k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer According to the API totalMemory() Returns the total amount of… May 16, 2026 at 1:52 pm
  • Editorial Team
    Editorial Team added an answer Don't send the user anywhere, but re-render the form right… May 16, 2026 at 1:52 pm
  • Editorial Team
    Editorial Team added an answer var str = "text-345-3535" var arr = str.split(/-/g).slice(1); Try it… May 16, 2026 at 1:52 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Using adLDAP.php class receiving following error: Notice: Undefined index: memberof in /web/ee_web/include/adLDAP.php on line
I am receiving the following error in PHP Notice undefined offset 1: in C:\wamp\www\includes\imdbgrabber.php
I am recieving an error: Notice: Undefined variable: content in C:\wamp\www\includes\imdbgrabber.php on line 17
Hi im trying to execute the following PHP code, however im receiving an error.
Warning: include(/2008/2009/assets/inc/base/error.inc.php) [function.include]: failed to open stream: No such file or directory in C:\Program
I am receiving this XML error: Only one top level element is allowed in
I am receiving this error: The ViewData item that has the key 'DepartmentId' is
When using(attempting) the SqlFileStream object, I am receiving an error System.ComponentModel.Win32Exception: Logon failure: unknown
I have been receiving errors when trying to save and run this Python 3.1
I am trying to develop a query to insert unique records but am receiving

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.