I am using the following PHP code to check a session. But if the session is not logged into then the page is not redirected and just shows the black page.
My if condition is right! It is hitting the header function...
Here is my code:
if(
!isset($_SESSION['SESS_MEMBER_ID'])
|| (trim($_SESSION['SESS_MEMBER_ID']) == '')
AND !isset($fb_login)
) {
header("location:login.php?msg=Please+Login+Again.");
}
How can I fix it?
HTTP/1.1 200 OK
Date: Wed, 10 Oct 2012 10:57:14 GMT
Server: Apache/2.2.15 (CentOS)
X-Powered-By: PHP/5.3.3
Connection: close
Transfer-Encoding: chunked
Content-Type: text/html; charset=UTF-8