Stack Exchange
How to fix "Undefined index: page in E:\Xammpp\htdocs\trms\index.php" error?
I am running my project on local host and getting this error after update my xampp. everything was good before.

Notice: Undefined index: page in E:\Xammpp\htdocs\trms\index.php on line 4
  Notice: Undefined index: remember in E:\Xammpp\htdocs\trms\index.php on line 5
  Could not connect Database

<?php
include_once 'include/processes.php';
$Login_Process = new Login_Process;
$Login_Process->check_login($_GET['page']);
$Login = $Login_Process->log_in($_POST['user'], $_POST['pass'], $_POST['remember'], $_POST['page'], $_POST['submit']); 

include_once 'templates/header.php'; 
?>

DB File Code
<?php

    #Database Information
    //Database Server (localhost)

    //define("DBHOST","213.171.200.57");
    define("DBHOST","127.0.0.1");
    //define("DBHOST”,”localhost”);

    //Database Username
    define("DBUSER", "root");
    //Database Password
    define("DBPASS","");
    //Database Name
    define("DBNAME","tsurphu_db");
    //Database Tabel
    define("STAFF","users");
    define("TSURPHU","tsurphus");
    define("KUNKYONGD","kunkyong_domestic");
    define("KUNKYONGF","kunkyong_foreign");
    //define("DONATION","donations");
    define("CURRENCY","currencies");
    //define("PAYMENT","payments");

    //Location Information

    //Path of script with trailing slashes
    define("Script_Path","/trms/");


    // Path in your webfiles with directory name uploads
    define("Upload_Path","../uploads/");


    //URL of script (no trailing slash)
    define("Script_URL","http://localhost/trms");



Are you sure that the page param is being sent in the request. Your code seems to indicate otherwise.

Please check $_GET['page'] using null coalescing operator, if you are using PHP 7.x:
$page = $_GET['page'] ?? '';


It returns its first operand if it exists and is not NULL; otherwise
  it returns its second operand.

For older PHP versions:
$page = isset($_GET['page']) ? $_GET['page'] : '';

<?php

include_once 'include/processes.php';

$page = $_GET['page'] ?? ''; // this is equivalent to $page = isset($_GET['page']) ? $_GET['page'] : '';

$Login_Process = new Login_Process;
$Login_Process->check_login($page);
$Login = $Login_Process->log_in($_POST['user'], $_POST['pass'], $_POST['remember'], $_POST['page'], $_POST['submit']); 

include_once 'templates/header.php'; 
?>


Parse error: syntax error, unexpected '?' in E:\Xammpp\htdocs\trms\index.php on line 5 ($page = $_GET['page'] ?? '';)

What is your PHP version?

PHP version is 5.

Then you should use $page = isset($_GET['page']) ? $_GET['page'] : '';. Please read the answer and documentation carefully.
