What cause me to get this error?
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively in Unknown on line 0
I researched for it and found some similar post, but I did not know how to come up with their solution some says the session_register() is deprecated instead use $_SESSION array. I don't have any idea how to use that because I'm only new in PHP. Would somebody help me? Thanks.
<?php
include 'db_connect.php';
require_once('authenticate.php');
session_start();
session_register('test_current_pass');
session_register('test_new_pass');
session_register('test_confirm_new_pass');
session_register('id');
$_SESSION['new_password'] = cleanString($_POST['new_pass']);
$test_current_pass = cleanString($_POST['current_pass']);
$test_new_pass = $_SESSION['new_password'];
$testconfirm_new_pass = cleanString($_POST['confirm_new_pass']);
$encrypt_current_pass = md5($test_current_pass);
$id = $_SESSION['id'];
.
.
.
?>
Here is the snippet of my code where I think is the error.