November 21, 200916 yr Hello I hope someone out there could help. Recently I have added a link to a site which asks for authentication hence in the name a username and password of the user. We do not have access to the server that stores the username and password, but we do use a control panel provided by our website host. The problem I am finding, is that the control panel allows us to protect a web link, but we thought it would be nice if there was some way of creating a log out button once someone has logged in, nut there is no option within the control panel for such a utility. Is there some way of doing this? Perhaps a forcing a reset timer once a user clicks the logout button? The only other way I can think of doing a logout, would be access via PHP code, but we can only use the control panel, so we do not have access to the server and thus do now know the format of PHP or pearl code. There is another way I was thinking and that would be javascript, but I am not sure how complex it would be to implement. The site is www.lso.ac.uk Thanks in advance
November 21, 200916 yr Hello I hope someone out there could help. Recently I have added a link to a site which asks for authentication hence in the name a username and password of the user. We do not have access to the server that stores the username and password, but we do use a control panel provided by our website host. The problem I am finding, is that the control panel allows us to protect a web link, but we thought it would be nice if there was some way of creating a log out button once someone has logged in, nut there is no option within the control panel for such a utility. Is there some way of doing this? Perhaps a forcing a reset timer once a user clicks the logout button? The only other way I can think of doing a logout, would be access via PHP code, but we can only use the control panel, so we do not have access to the server and thus do now know the format of PHP or pearl code. There is another way I was thinking and that would be javascript, but I am not sure how complex it would be to implement. The site is www.lso.ac.uk Thanks in advance Well say if your using sessions create a page called logout.php and add this code in there <?php session_start(); if($_SESSION['uid']){ unset($_SESSION['uid']); header("Location:login.php"); }else{ echo "You are already logged out"; } ?>
Create an account or sign in to comment