I have designed a web log in checking the username against a database and then storing the username in a session variable.
I start the login.php page with;
session_start();
session_register("sessionName"); //username
however this does not work the first time the user logs in and they have to log out via a logout.php page first where i have
session_destroy();
Then when they log in again all is okay and the session variables are registered
code from index.php to check session
session_start();
session_register("sessionName");
$sessionId=session_id();
//print("Session Id is: $sessionId");
//print("<br>Session Name is: $sessionName");
if(!$sessionName){
logout_User();
}
Any ideas why this is not working
using PHP4 on Windows NT4 and apache