Forums

This topic is locked

Session Variables

Posted 19 Jan 2005 08:57:02
1
has voted
19 Jan 2005 08:57:02 Chris Trace posted:
Hey there,

At the completion of a form submission which set a session variable at the beginning i would like to be able to clear all session variables once the form submission is complete.

Is there a simple way to do this.

Thanks

Replies

Replied 19 Jan 2005 10:32:12
19 Jan 2005 10:32:12 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>At the completion of a form submission which set a session variable at the beginning i would like to be able to clear all session variables once the form submission is complete.

Is there a simple way to do this?<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
<b>What application Server Model?</b> (PHP, ASP, .NET, ColdFusion, JSP)
Replied 19 Jan 2005 19:27:02
19 Jan 2005 19:27:02 Simon Bloodworth replied:
you could try something like this.

&lt;%
Session.Contents.Remove("name_of_session"
response.redirect("nextpage.asp"
%&gt;

put this in a file on its own and point your form to this page.
Replied 19 Jan 2005 21:17:03
19 Jan 2005 21:17:03 Chris Charlton replied:
If you are using PHP, you should read: www.php.net/session

And you might want to check out:
<ul><li><b>Working with Session Variables in PHP</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=5454</li><li><b>PHP Basics: Cookies and Sessions</b> - www.dmxzone.com/showDetail.asp?TypeId=28&NewsId=6656</li></ul>
Replied 20 Jan 2005 17:05:16
20 Jan 2005 17:05:16 Chris Trace replied:
Thanks a lot of useful tips and tricks in there.

Think I have it solved now.

Cheers

Reply to this topic