How to create logout link
I am trying to create logout link but its no redirect to login page
I am trying to create logout link but its no redirect to login page
There is nothing on that page that would redirect to the login page. Usually you add a message to the logout page that says: "You have been logged out, click here to log back in" or something like that.
If you want to go directly to the login page when they log out, then have the log out link go to login.php?logout and then put the log out server behavior on the login page with a trigger: isset($_GET["logout"]
What am I looking for? Please describe the issue you are having so I can properly guide you. It looks like this login page would work to me.
Describe what you are trying to do and what happens that you expect to work that doesn't.
There are a bunch of ways you can do it. It depends on the user experience you are trying to support. One way is to create a new page with the text "You have been logged out" and then apply the server behavior "MySQLi Logout User" with the trigger "before page loads". Then any link to that page would work as a logout link.
Thanks sir its worked :)
I would like to tell that how its work so that other people can get help by it
create a new page and then apply the server behavior "MySQLi Logout User" with the trigger "before page loads". Then any link to that page would work as a logout link.in your new page your code will be like this:
if ("" === "") {
$LogOut = new WA_MySQLi_Auth();
$LogOut->Action = "logout";
$LogOut->Name = "loginForm";
$LogOut->execute();
}
add $LogOut->Redirect("your_login_page.php); before $LogOut->execute();
Thanks
Hi Ray,
There is a problem with the logout page. I have created mine as seen below but when I type the link to dashboard on the address, the dashboard load.
Here is my logout code
<?php
if ("" === "") {
$LogOut = new WA_MySQLi_Auth();
$LogOut->Action = "logout";
$LogOut->Name = "Admin";
$LogOut->Redirect("login.php");
$LogOut->execute();
}
?>
Attached is my logout.php file for your review
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.