Sessions ....

Results 1 to 3 of 3

Thread: Sessions ....

  1. #1
    Sunny Guest

    Default Sessions ....

    I have a page which inserts some data in database that is coming from the text boxes filled on previous pages.<BR>I am using get method....On form action I have given the next page name.<BR>What happens is that when i refresh the page after insert is made once it add this record again.To add this data on second page as i have multiple actions on 2nd page i have to use select statement like (select case request("submit")<BR> case ("Add").....<BR> coming from some other page ==&#062; case ("save").....<BR> <BR>I tried this with post method also. <BR>how do i do this.<BR>

  2. #2

    Default RE: Sessions ....

    Hi,<BR><BR>Set a Session/Page Variable to:<BR>1. Track if the user has visited the insert page before<BR>2. If they have, then prevent the insert, else do the insert<BR><BR>eg.<BR>&#060;%<BR><BR>response.buffe r=true<BR>Session("INSERTDONE")="TRUE"<BR><BR>if Session("INSERTDONE")="TRUE" then<BR> Response.redirect "homepage.asp" &#039Prevent the insert<BR>else<BR><BR>Dim objConn<BR>Set objConn = Server.Createobject("Adodb.connection")<BR>.<BR>.< BR>.<BR><BR><BR>%&#062;<BR><BR>This should lead you in the right direction Sunny.<BR><BR>Cheers,<BR><BR>IQ

  3. #3
    Sunny Guest

    Default RE: Sessions ....

    this helped me...<BR>it was not the full solution but i got the idea from it.<BR><BR>Thanks Imran

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts