In This Site

Home
Free News Updates
Using Microsoft FrontPage
Cascading Style Sheets
Database Fundamentals
FrontPage & Access
FrontPage Navigation
Website Security
Solving Problems
Learning SQL
Code Samples
Promote Your Site

In This Section

Cookie-based Login
Welcome Page
Display Cookie Value
Cookie Logout

 

 

 

Take Your Web Site to New Levels

Providing a Logout Option for Your Users

This tutorial is part of a lengthy discussion on creating a cookie-based login system that will restrict access to specific pages or database records. Click here to read this article from the beginning

In order to logout of the system you simply set the cookie value to a blank string ("") OR set the expiry date to a time in the past. For this example I've used the second method. In this case, I created a blank page and deleted all the html code and inserted the following code:

<%
Response.Cookies("Login").Expires ="1/27/2001"
Response.Redirect "RemoveCookie.asp"
%>

This page expired the cookie and then redirected you to this page once the cookie had been removed. You should see a message below that your cookie has been removed. Otherwise you will see the cookie value.

Your Cookie Has Been Removed

Removing your cookie also logs you out of the website. If you try to access the Welcome Page or the Cookie Test pages you will be redirected to the Login page. You will need to login again to access the password protected area of the website. Click here to do so


These tutorials are part of an upcoming training course called "FrontPage Magic - How To Create A Database Driven Website For Non-Programmers". Stay tuned for more details on this exciting new product.

Send your tips to .
All materials Copyright © Ward Cameron All Rights Reserved