Results 1 to 3 of 3

Thread: AVOID multiple form submittals via "back button"

  1. #1
    Join Date
    Jun 2007
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question AVOID multiple form submittals via "back button"

    I know there really isn't a way to disable the "back button" on the browser BUT ... I'm trying to not allow multiple entries via a form submit when the back button is depressed on the browser.

    Basically is there a code snippet that somebody can provide so that when a form is submitted and somebody attempts to go back by hitting the "back" button, that form information just entered won't resubmit into the database?

    Any assistance you provide is greatly appreciated!!!

    Thanks Much,
    Des

  2. #2
    Join Date
    Feb 2008
    Location
    Cebu City Philippines
    Posts
    1,160
    Thanks
    17
    Thanked 277 Times in 275 Posts

    Default

    YOu could just create a query and make matches in the database....if the inputs already exist in the databse....then don't let it be saved.

    I would love to code it for you...but when I see it..It's in ASP...I don't know anything about it..i'm more on PHP

    but I guess...same thing applied...
    Learn how to code at 02geek

    The more you learn, the more you'll realize there's much more to learn
    Ray.ph!

  3. #3
    Join Date
    Feb 2008
    Location
    Buenos Aires, Argentina
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Cool Try with Session Cookies...

    Try saving a session cookie on the INSERT asp page:

    Code:
    If Session("already_inserted") = "" then
      SQL = "..."
      Session("already_inserted") = "Y"
      Response.Redirect "..."
    Else
      Response.Write "You already submitted the form"
    End If
    So, If the session cookie has already been created, it won't let the user pass the information again to the database, at least for several minutes. If you want something more permanent, use cookies with the ".Expires" value and not Session cookies. Regards!

Bookmarks

Posting Permissions

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