![]() |
Alexey admin 6/21/2006 |
Hi, if(!@$_SESSION["UserID"]) { $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; header("Location: login.php?message=expired"); return; }
<a href="login.php?a=logout">Log out</a> |
B
|
bmak author 6/21/2006 |
Hi, put this code to the beginning of your page to secure it: Here is the code for logout link:
|
![]() |
Alexey admin 6/21/2006 |
sure, login.php clears session when you pass it a=logout parameter. |
B
|
bmak author 6/21/2006 |
Hello, |
B
|
bmak author 6/22/2006 |
Hello Alexa, |
![]() |
Alexey admin 6/22/2006 |
Hi, if(!@$_SESSION["UserID"]) { $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; header("Location: login.php?message=expired"); return; }
|
B
|
bmak author 6/22/2006 |
Hi, this is PHP code: Sure, it should be placed inside PHP braces.
|
![]() |
Alexey admin 6/22/2006 |
Try to put a call to session_start() function to the beginning of your file. session_start(); if(!@$_SESSION["UserID"]) { $_SESSION["MyURL"]=$_SERVER["SCRIPT_NAME"]."?".$_SERVER["QUERY_STRING"]; header("Location: login.php?message=expired"); return; } |
B
|
bmak author 6/23/2006 |
Hi Alexa, |