CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 Session values still available after logging out and clicking browser back button

Print topic Send  topic

Author Message
NewUser

Posts: 6
Posted: 06/10/2014, 4:00 AM

Hi,

I have upgraded to codecharge 5.1 version. When User clicks Logout, Iam clearing all the session variables. But when browser back button is clicked, the session variable values are still available.

I didnt have this problem with codecharge 5.0 version with the same code.

Also, I have added session_start() in common.php since sessions were not available after logging in.

Any help is appreciated.

Thanks
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 06/10/2014, 7:05 PM

If logout takes you to the login page?

Then on your login page, may be in the page before initialize event or similar event put this:

CCSetSession("sessionvariablename","");


_________________
Central Coast, NSW, Australia.

View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 06/10/2014, 7:15 PM

And here's a little JS that emulates disabling the browsers back button by re-forcing forward to the last page .. it's cool because it forces users to use links or buttons....

<script type="text/javascript">
window.history.forward();
function noBack() { window.history.forward(); }
</script>

<body onpageshow="if (event.persisted) noBack();">
_________________
Central Coast, NSW, Australia.

View profile  Send private message
NewUser

Posts: 6
Posted: 06/11/2014, 12:31 AM

Hi,


Thanks for the reply. I tried putting session_unset() in page before initialize event of login page. But still i am getting the same issue..


Thanks
View profile  Send private message
MichaelMcDonald

Posts: 640
Posted: 06/11/2014, 6:39 PM

CCSetSession("sessionvariablename","");

declares it as a null.
_________________
Central Coast, NSW, Australia.

View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.