APO-Epsilon/apo-website

View on GitHub
updateinfo.php

Summary

Maintainability
F
3 days
Test Coverage

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_SESSION.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_SESSION.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_SESSION.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_SESSION.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_SESSION.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_POST.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_SESSION.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

show_page accesses the super-global variable $_GET.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Minor
Found in updateinfo.php by phpmd

Superglobals

Since: 0.2

Accessing a super-global variable directly is considered a bad practice. These variables should be encapsulated in objects that are provided by a framework, for instance.

Example

class Foo {
    public function bar() {
        $name = $_POST['foo'];
    }
}

Source

Method show_page has 287 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function show_page() {
  include('mysql_access.php');
  global $current_semester;

  if (isset($_POST['update'])) {
Severity: Major
Found in updateinfo.php - About 1 day to fix

    File updateinfo.php has 324 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    <?php
    require_once ('session.php');
    require_once ('mysql_access.php');
    ?>
    <!doctype html>
    Severity: Minor
    Found in updateinfo.php - About 3 hrs to fix

      Function show_page has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php - About 2 hrs to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      The function show_page() has 318 lines of code. Current threshold is set to 100. Avoid really long methods.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      Avoid using undefined variables such as '$db' which will lead to PHP notices.
      Open

        return $db->real_escape_string($a);
      Severity: Minor
      Found in updateinfo.php by phpmd

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      Avoid using undefined variables such as '$db' which will lead to PHP notices.
      Open

          $result = $db->query($sql);
      Severity: Minor
      Found in updateinfo.php by phpmd

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      Avoid using undefined variables such as '$db' which will lead to PHP notices.
      Open

        $query_orgs = $db->query($select_orgs) or die("There was a problem querying the organizations. Contact the webmaster.");
      Severity: Minor
      Found in updateinfo.php by phpmd

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      Avoid using undefined variables such as '$db' which will lead to PHP notices.
      Open

          $result = $db->query($sql);
      Severity: Minor
      Found in updateinfo.php by phpmd

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      Avoid using undefined variables such as '$db' which will lead to PHP notices.
      Open

          $result2 = $db->query($sql2);
      Severity: Minor
      Found in updateinfo.php by phpmd

      UndefinedVariable

      Since: 2.8.0

      Detects when a variable is used that has not been defined before.

      Example

      class Foo
      {
          private function bar()
          {
              // $message is undefined
              echo $message;
          }
      }

      Source https://phpmd.org/rules/cleancode.html#undefinedvariable

      The method show_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          }else{
            $genderM = "";
            $genderF = "";
          }
      Severity: Minor
      Found in updateinfo.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      The method show_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

        } else {
      
          $user_id = $_SESSION['sessionID'];
          $sql = "SELECT * FROM `contact_information` WHERE `id` = '$user_id' LIMIT 1";
          $result = $db->query($sql);
      Severity: Minor
      Found in updateinfo.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      The method show_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          } else {
            echo "There may have been an error.  Click <a href='./updateinfo.php'>here</a> to try again.";
            $_SESSION['active_sem'] = $current_semester;
            echo $_SESSION['active_sem'];
          }
      Severity: Minor
      Found in updateinfo.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      The method show_page uses an else expression. Else clauses are basically not necessary and you can simplify the code by not using them.
      Open

          }else{
            $selectedF = "";
            $selectedT = "checked=\"yes\"";
          }
      Severity: Minor
      Found in updateinfo.php by phpmd

      ElseExpression

      Since: 1.4.0

      An if expression with an else branch is basically not necessary. You can rewrite the conditions in a way that the else clause is not necessary and the code becomes simpler to read. To achieve this, use early return statements, though you may need to split the code it several smaller methods. For very simple assignments you could also use the ternary operations.

      Example

      class Foo
      {
          public function bar($flag)
          {
              if ($flag) {
                  // one branch
              } else {
                  // another branch
              }
          }
      }

      Source https://phpmd.org/rules/cleancode.html#elseexpression

      Avoid unused local variables such as '$db'.
      Open

        return $db->real_escape_string($a);
      Severity: Minor
      Found in updateinfo.php by phpmd

      UnusedLocalVariable

      Since: 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example

      class Foo {
          public function doSomething()
          {
              $i = 5; // Unused
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

      The function list_orgs() contains an exit expression.
      Open

        $query_orgs = $db->query($select_orgs) or die("There was a problem querying the organizations. Contact the webmaster.");
      Severity: Minor
      Found in updateinfo.php by phpmd

      ExitExpression

      Since: 0.2

      An exit-expression within regular code is untestable and therefore it should be avoided. Consider to move the exit-expression into some kind of startup script where an error/exception code is returned to the calling environment.

      Example

      class Foo {
          public function bar($param)  {
              if ($param === 42) {
                  exit(23);
              }
          }
      }

      Source https://phpmd.org/rules/design.html#exitexpression

      Avoid unused local variables such as '$db'.
      Open

        $query_orgs = $db->query($select_orgs) or die("There was a problem querying the organizations. Contact the webmaster.");
      Severity: Minor
      Found in updateinfo.php by phpmd

      UnusedLocalVariable

      Since: 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example

      class Foo {
          public function doSomething()
          {
              $i = 5; // Unused
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

      Avoid unused local variables such as '$result2'.
      Open

          $result2 = $db->query($sql2);
      Severity: Minor
      Found in updateinfo.php by phpmd

      UnusedLocalVariable

      Since: 0.2

      Detects when a local variable is declared and/or assigned, but not used.

      Example

      class Foo {
          public function doSomething()
          {
              $i = 5; // Unused
          }
      }

      Source https://phpmd.org/rules/unusedcode.html#unusedlocalvariable

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

        if (isset($_POST['update'])) {
          // Update Information
          $_POST = array_map('array_map_calllback', $_POST);
          $user_id = $_SESSION['sessionID'];
      $sql = <<<SQL
      Severity: Major
      Found in updateinfo.php and 1 other location - About 1 day to fix
      status_change.php on lines 25..178

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 297.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      A file should declare new symbols (classes, functions, constants, etc.) and cause no other side effects, or it should execute logic with side effects, but should not do both. The first symbol is defined on line 27 and the first side effect is on line 2.
      Open

      <?php
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Avoid variables with short names like $a. Configured minimum length is 3.
      Open

      function array_map_calllback($a) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      ShortVariable

      Since: 0.2

      Detects when a field, local, or parameter has a very short name.

      Example

      class Something {
          private $q = 15; // VIOLATION - Field
          public static function main( array $as ) { // VIOLATION - Formal
              $r = 20 + $this->q; // VIOLATION - Local
              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                  $r += $this->q;
              }
          }
      }

      Source https://phpmd.org/rules/naming.html#shortvariable

      Avoid variables with short names like $i. Configured minimum length is 3.
      Open

        $i = 1;
      Severity: Minor
      Found in updateinfo.php by phpmd

      ShortVariable

      Since: 0.2

      Detects when a field, local, or parameter has a very short name.

      Example

      class Something {
          private $q = 15; // VIOLATION - Field
          public static function main( array $as ) { // VIOLATION - Formal
              $r = 20 + $this->q; // VIOLATION - Local
              for (int $i = 0; $i < 10; $i++) { // Not a Violation (inside FOR)
                  $r += $this->q;
              }
          }
      }

      Source https://phpmd.org/rules/naming.html#shortvariable

      Blank line found at end of control structure
      Open

      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Blank line found at start of control structure
      Open

        } else {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      TRUE, FALSE and NULL must be lowercase; expected "true" but found "True"
      Open

      $active_page = True;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
      Open

      $exec_page = False;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      TRUE, FALSE and NULL must be lowercase; expected "false" but found "False"
      Open

      $public_page = False;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 128 characters
      Open

                  <input type="text" name="last_name" value="$row[lastname]" placeholder="Last name" required="" autocomplete="name"/>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 122 characters
      Open

        $query_orgs = $db->query($select_orgs) or die("There was a problem querying the organizations. Contact the webmaster.");
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 421 characters
      Open

          $force = "<div style='margin: 50px; padding: 10px; background: #F08080; '><h1 style='color:red;'>Please update your information for this semester.</h1> Do you have any new <b>Littles</b>, different <b>status</b>, have a new <b>local address</b>, or change your <b>major</b> recently?  You will not be able to access the site until you have clicked 'Update' below.  If you have problems, contact the webmaster!</div>";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 131 characters
      Open

                  <input type="text" name="first_name" value="$row[firstname]" placeholder="First name" required="" autocomplete="name"/>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 162 characters
      Open

        <p>If you wish to change your status, the form can be found <a href="https://docs.google.com/a/truman.edu/file/d/0B_qnfQK1uoMVZGhKbGxsLUtMRW8/edit">here</a></p>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 129 characters
      Open

                  <input type="text" name="email" value="$row[email]" placeholder="name@example.com" required="" autocomplete="email"/>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 180 characters
      Open

                  <input type="text" name="homeaddress" value="$row[homeaddress]" pattern="[a-zA-Z\d\s\-\,\#\.\+]+" placeholder="123 Any Street" autocomplete="Permanent street-address"/>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 398 characters
      Open

                  <input type="text" name="phone" value="$row[phone]" placeholder="+1-555-555-1234" required="" pattern="^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$" autocomplete="tel"/>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      End of line character is invalid; expected "\n" but found "\r\n"
      Open

      <?php
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line exceeds 120 characters; contains 179 characters
      Open

                  <input type="text" name="local_address" value="$row[localaddress]" pattern="[a-zA-Z\d\s\-\,\#\.\+]+" placeholder="123 Any Street" autocomplete="Local street-address"/>
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 4 spaces, found 2
      Open

        global $current_semester;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          if($result && $_POST['race'] != "" && $_POST['gender'] != 0){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            echo "Your information has been updated.  Click <a href='./updateinfo.php'>here</a> to make more changes. ";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        } else {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $selected = $row['hide_info'];
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          if($selected == 'F'){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $selectedF = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $_SESSION['active_sem'] = $current_semester;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            echo $_SESSION['active_sem'];
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          if($gender == 2){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $genderF = "checked=\"yes\"";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 2
      Open

        $query_orgs = $db->query($select_orgs) or die("There was a problem querying the organizations. Contact the webmaster.");
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 4
      Open

          $force = "<div style='margin: 50px; padding: 10px; background: #F08080; '><h1 style='color:red;'>Please update your information for this semester.</h1> Do you have any new <b>Littles</b>, different <b>status</b>, have a new <b>local address</b>, or change your <b>major</b> recently?  You will not be able to access the site until you have clicked 'Update' below.  If you have problems, contact the webmaster!</div>";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Space before opening parenthesis of function call prohibited
      Open

      require_once ('session.php');
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $genderM = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 0
      Open

      }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Space before opening parenthesis of function call prohibited
      Open

      require_once ('mysql_access.php');
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          }else if($gender == 1){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }else{
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 2
      Open

        $i = 1;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 4 spaces, found 2
      Open

        show_page();
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $_SESSION['active_sem'] = $current_semester;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $user_id = $_SESSION['sessionID'];
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $genderF = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          }else if($gender == 1){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

          }else{
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function list_orgs(){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 4 spaces, found 2
      Open

        include('mysql_access.php');
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $result = $db->query($sql);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          if($selected == 'F'){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $selectedF = "checked=\"yes\"";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $genderM = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          if($result && $_POST['race'] != "" && $_POST['gender'] != 0){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          if($gender == 2){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 0
      Open

      echo<<<END
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            echo "There may have been an error.  Click <a href='./updateinfo.php'>here</a> to try again.";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

          }else{
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $gender = $row['gender'];
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 2
      Open

        }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        if (isset($_GET['forced']) == "true") {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function array_map_calllback($a) {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 4 spaces, found 2
      Open

        include('mysql_access.php');
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after IF keyword; 0 found
      Open

          if($result && $_POST['race'] != "" && $_POST['gender'] != 0){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing parenthesis; found 0
      Open

          if($gender == 2){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

          }else{
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 0
      Open

      $select_orgs = <<<SQL
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 2
      Open

        }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 4 spaces, found 2
      Open

        return $db->real_escape_string($a);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $b_day = mktime(0, 0, 0, intval($row['bmonth']), 1, 2000);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }else{
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $selectedT = "checked=\"yes\"";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after closing brace; 0 found
      Open

          }else if($gender == 1){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $genderF = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 0
      Open

      function list_orgs(){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Space before opening parenthesis of function call prohibited
      Open

        include ('mysql_access.php');
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 12 spaces, found 2
      Open

        while ($orgs = mysqli_fetch_array($query_orgs)) {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 0
      Open

      echo<<<END
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function show_page() {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $_POST = array_map('array_map_calllback', $_POST);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $user_id = $_SESSION['sessionID'];
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $row = mysqli_fetch_array($result);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          if($selected == 'F'){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $genderM = "checked=\"yes\"";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          }else if($gender == 1){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 16 spaces, found 4
      Open

          $i = $i + 1;
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 4 spaces, found 2
      Open

        }
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Opening brace should be on a new line
      Open

      function show_active() {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            echo $_SESSION['active_sem'];
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $sql = "SELECT * FROM `contact_information` WHERE `id` = '$user_id' LIMIT 1";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 16 spaces, found 4
      Open

          echo "<option id='$orgs[id]''>$orgs[name]</option>";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $result2 = $db->query($sql2);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected 8 spaces, found 4
      Open

          } else {
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $month = date('F', $b_day);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 6
      Open

            $selectedT = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Expected 1 space after ELSE keyword; 0 found
      Open

          }else{
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Usage of ELSE IF is discouraged; use ELSEIF instead
      Open

          }else if($gender == 1){
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 2
      Open

        $force = "";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 0
      Open

      $sql = <<<SQL
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $sql2 = "UPDATE `contact_information` SET visited = '1' WHERE id = '$user_id' LIMIT 1";
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 8 spaces, found 4
      Open

          $result = $db->query($sql);
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      Line indented incorrectly; expected at least 12 spaces, found 2
      Open

        include ('mysql_access.php');
      Severity: Minor
      Found in updateinfo.php by phpcodesniffer

      The variable $user_id is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $current_semester is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $user_id is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $user_id is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $b_day is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $current_semester is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $select_orgs is not named in camelCase.
      Open

      function list_orgs(){
        include ('mysql_access.php');
      
      $select_orgs = <<<SQL
        SELECT `name`, `id`
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $current_semester is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $current_semester is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $query_orgs is not named in camelCase.
      Open

      function list_orgs(){
        include ('mysql_access.php');
      
      $select_orgs = <<<SQL
        SELECT `name`, `id`
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $query_orgs is not named in camelCase.
      Open

      function list_orgs(){
        include ('mysql_access.php');
      
      $select_orgs = <<<SQL
        SELECT `name`, `id`
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $b_day is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $user_id is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $user_id is not named in camelCase.
      Open

      function show_page() {
        include('mysql_access.php');
        global $current_semester;
      
        if (isset($_POST['update'])) {
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      The variable $select_orgs is not named in camelCase.
      Open

      function list_orgs(){
        include ('mysql_access.php');
      
      $select_orgs = <<<SQL
        SELECT `name`, `id`
      Severity: Minor
      Found in updateinfo.php by phpmd

      CamelCaseVariableName

      Since: 0.2

      It is considered best practice to use the camelCase notation to name variables.

      Example

      class ClassName {
          public function doSomething() {
              $data_module = new DataModule();
          }
      }

      Source

      There are no issues that match your filters.

      Category
      Status