Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to remove/empty all sessions

Status
Not open for further replies.

camillaj

Programmer
Sep 18, 2003
31
0
0
AU
I'm trying to empty all my session, just after all values have been submitted. I tried with Session.Abandon(), but that doesn't seem to change anything.

I want to do this because if the user refreshes the page after submitting values, an error occur because I try to add the same values to DB again.

I just want a check that if session is empty, then don't add values again!

Thanks :)
 
Just make this scenario.

formular.asp
<%
Session(&quot;insert&quot;)=true
%>
<form action=&quot;addrecord.asp&quot; method=post>
....
</form>

and if addrecord.asp

<%
If not Session(&quot;insert&quot;) then
'you added the record already
Response.End
end if
Session(&quot;insert&quot;)=false
'make your insert here
%>

________
George, M
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top