Depracted Function

I have older code that I am working with but its given errors. Here is my code.

if (!session_is_registered("userid") && !session_is_registered("user_type"))
{
	header("Location: login.php");
	exit(0);
}

Use this code instead:
[php]
if(!isset($_SESSION[‘userid’]) and !isset($_SESSION[‘user_type’])){
header(“Location: login.php”);
exit;
}
[/php]
But you may have other instances of functions such as session_register(), session_is_registered() that you need to replace as well.

Sponsor our Newsletter | Privacy Policy | Terms of Service