To create a logout link on your site and clean all session A session is a way to preserve certain data across subsequent accesses of the same web application. The session object contains many variables to store user information on the web server in a location that you choose in special files. The session support allows you to register arbitrary numbers of variables to be preserved across requests. Sessions are specific to individual users. As a result, every user has a separate session and has access to a separate set of Session variables. variables, you should apply the Logout User server behavior A server behavior is a reusable component for server-side development. They add blocks of code to your pages for accomplishing specific tasks. Dreamweaver comes with several default server behaviors and the InterAKT extensions add many more to this list. from the Application panel -> Server Behaviors -> MX Kollection -> User Login. This server behavior should be applied to both company/index and user/index files.
First, open the company/index page and create a new paragraph below the existing links. Place the cursor in the new paragraph, enter the Logout text, and apply the Logout User server behavior:
Check the Link clicked radio button. For the redirect page, use the Browse button to select the main index.php file.
Save the page. When a logged-in user will click the link, its session data will be deleted, and he will be redirected to the site index page.
Follow the same procedure for the user/index page.
Note: If you use this server behavior on the ColdFusion server model, a file named Application.cfm will be automatically generated in the site root folder. Do not delete this file, as it contains settings related to session variables used by the server behavior and the current application. If you remove this file or modify it, application pages that use sessions will not function properly.