PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Hi all,
I need some help here. I have a page with control panel at side template and their function at main template.There is a Logoff at the side template.What I want is, when I cklick Logoff, the page will link to Login page. But the problem i have is when i click the Logoff, the side template is there and only main template show the Login page.Below is my code for Logoff text:-
You'll need to set the function in admin.php or in the actual script and the add header("location:admin.php");
However you want to use session_destroy() or session_unset().
For the cookies I like to unset them assigning an empty value: eg
setcookie("username", "", time() - 2000);