Tried now to use the Logout Object.
I have a PHP page with the DBTS CSV List object by Navaldesign. The report works fine, but I am protecting the page with the Page Protect object and I want users to click the Logout button to get out when they finish viewing the report.
When they click the logout button, it takes them out from the report back to be presented with the Password page protect form, it doesn't!
I redirected it to the previous page, but if a user clicks to get back to the report, they can get in without the need to go through the password screen
Any idea?
Logout object
Forum rules
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html
TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
PLEASE READ THE FORUM RULES BEFORE YOU POST:
viewtopic.php?f=12&t=1901
MUST READ:
http://www.wysiwygwebbuilder.com/login_basics.html
http://www.wysiwygwebbuilder.com/login_tools.html
TIP:
A lot of information about the login tools can be found in the help/manual.
Also checkout the demo template that is include with the software.
Re: Logout object
Maybe there is invalid code at the start of the page?
Note that logout is nothing more than clearing the session variable.
Note that logout is nothing more than clearing the session variable.
Re: Logout object
I didn't add any manual code to the page
Maybe the problem is that I added the Logout object onto the bottom of the same page where the DBTS CSV List object is located
If that is allowed, then I don't know what else to do
Maybe the problem is that I added the Logout object onto the bottom of the same page where the DBTS CSV List object is located
If that is allowed, then I don't know what else to do
Re: Logout object
I do not know what code is generated the 'DBTS CSV List' object'.
But there may be a conflict in the code.
But there may be a conflict in the code.
- Navaldesign
-
- Posts: 862
- Joined: Sat Mar 01, 2008 8:08 pm
- Location: Italy
- Contact:
Re: Logout object
You should NOT use the Page Protect object. The DBTS CSV list already allows you to set protection ( B. Page Accessibility, -> >Allowed Access -> 2. Logged users).
You can NOT use the logout object in the same page as the "logout" object code destroys the session and the user will not be able to view the list.
You can use a button to link to another page and place the following code in the Start of Page of this other page:
<?php
if (session_id() == "")
{
session_start();
}
unset($_SESSION['username']);
unset($_SESSION['password']);
header ("Location: redirectpage.php");
exit;
?>
where redirectpage.php (or whatever else) is the page where you want to redirect after logging out.
You can NOT use the logout object in the same page as the "logout" object code destroys the session and the user will not be able to view the list.
You can use a button to link to another page and place the following code in the Start of Page of this other page:
<?php
if (session_id() == "")
{
session_start();
}
unset($_SESSION['username']);
unset($_SESSION['password']);
header ("Location: redirectpage.php");
exit;
?>
where redirectpage.php (or whatever else) is the page where you want to redirect after logging out.
www.dbtechnosystems.com