Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

creating logoff funtion

Featured Replies

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

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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.