C
Colin Steadman
I have created a function to kill all session variables
that aren't in a safe list. This is the function -
Sub PurgeSessionVariables
For Each Item In Session.Contents
Select Case Trim(Item)
Case "Authenticated"
Case "CI_CODE"
Case "organisation_description"
Case "location_description"
Case "company"
Case Else
response.write "Killing:" & Item & "<br>"
Session.Contents.Remove(Item)
End Select
Next
End Sub
If I refresh the page that calls this function I get this -
Killing: general_problems
Killing: phone_problems
Killing: title
Killing: preferred_forename
Killing: ni
Killing: initials
Killing: dob_dd
Killing: dob_yyyy
Killing: doe_mm
Killing: memorabledate_dd
Killing: memorabledate_yyyy
Killing: sex
Killing: phone
Killing: fax
Killing: mobex
Killing: roles
If I then hit F5 to refresh I see this -
Killing: personal_problems
Killing: forenames
Killing: jobtitle
Killing: dob_mm
Killing: doe_yyyy
Killing: mothers_maiden_name
Killing: mobile
Killing: pager
If I then hit F5 again to refresh I see this -
Killing: roles_problems
Killing: surnameinitials
Killing: memorabledate_mm
Killing: altphone
If I then hit F5 again to refresh I see this -
Killing: surname
Killing: empstatus
If I then hit F5 again to refresh I see this -
Killing: doe_dd
And finally if I then hit F5 again no further variable are
deleted. This is very odd as all unwanted session
variables should be removed on the first refresh. I've
gone through my code line by line several times but I
really cant see whats going wrong... Any ideas?
TIA,
Colin
that aren't in a safe list. This is the function -
Sub PurgeSessionVariables
For Each Item In Session.Contents
Select Case Trim(Item)
Case "Authenticated"
Case "CI_CODE"
Case "organisation_description"
Case "location_description"
Case "company"
Case Else
response.write "Killing:" & Item & "<br>"
Session.Contents.Remove(Item)
End Select
Next
End Sub
If I refresh the page that calls this function I get this -
Killing: general_problems
Killing: phone_problems
Killing: title
Killing: preferred_forename
Killing: ni
Killing: initials
Killing: dob_dd
Killing: dob_yyyy
Killing: doe_mm
Killing: memorabledate_dd
Killing: memorabledate_yyyy
Killing: sex
Killing: phone
Killing: fax
Killing: mobex
Killing: roles
If I then hit F5 to refresh I see this -
Killing: personal_problems
Killing: forenames
Killing: jobtitle
Killing: dob_mm
Killing: doe_yyyy
Killing: mothers_maiden_name
Killing: mobile
Killing: pager
If I then hit F5 again to refresh I see this -
Killing: roles_problems
Killing: surnameinitials
Killing: memorabledate_mm
Killing: altphone
If I then hit F5 again to refresh I see this -
Killing: surname
Killing: empstatus
If I then hit F5 again to refresh I see this -
Killing: doe_dd
And finally if I then hit F5 again no further variable are
deleted. This is very odd as all unwanted session
variables should be removed on the first refresh. I've
gone through my code line by line several times but I
really cant see whats going wrong... Any ideas?
TIA,
Colin