I have the following code and was wondering why it no longer works in PHP 5.
This is the if statement at the beginning of authenticate.php:
if (!$_POST['username'] || !$_POST['pwd']) { include("emptyUser.php"); exit; }
and later in the authentication.php file that sets the session:
session_start();
$_SESSION["username"] = $username;
and in the header.php of each page:
session_start();
if ( isset( $_SESSION[ 'username' ] ) && ( $_SESSION[ 'username' ] = $username ) )
{
}
else
{
include("emptyUser.php");
exit;
}
Anything here that won't work in PHP 5?
Many thanks in advance!!!
Rupert