I’m using old php script that depends on session_register to gives warning messages but later after my hosting update PHP version to [PHP Version 5.3.2-1ubuntu4.14]
check.php
<?PHP
$msg= "Wrong Login";
session_register('msg');
header("Location: login.php ");
?>
login.php
<?PHP
echo $msg;
session_unregister('msg')
?>
it should gives Wrong Login but it gives nothing.
so any help please why session_register and is there any way else can do me the same
~ Thanks
You should directly access the $_SESSION[] array to alter session variables.
Also you should make sure you have called session_start(); before doing anything related with sessions.