alternative for session_registered in a login script

i am using a webhost that does not allow a session_registered code in it

in my login code i am using this code
[php]<?php
session_start();
if(!session_is_registered($_SESSION[‘username2’])){
header(“location:adminlogin.php”);
}
?>[/php]

whats a good way to do this without using a session is registered?

[php]if(isset($_SESSION[‘username2’])) {

// Session has been set

}[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service