SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict goma's Avatar
    Join Date
    Jan 2002
    Location
    smelly armpit of Asia
    Posts
    305
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    clearing a mail form in php?

    let's say I have a form for mail. After the visitor sends me a message, how can I clear the form when he or she tries to go back to the form?

    I'm toying around with Php for form mail and I'm wondering if there's a way to clear the form if you try to resend the message by using the back button.
    http://www.soapbox101.com

  2. #2
    will code HTML for food Michel V's Avatar
    Join Date
    Sep 2000
    Location
    Corsica
    Posts
    552
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's only a browser thing, depending on how the browser uses its cache. Most browsers would just get the form from the cache, with all the content that was last typed in it.
    And worse, browsers like Mozilla or Netscape 6 now offer to remember the form's data, so you can't even counter that

    Maybe with some javascript ?
    But anyway, this WON'T stop spam.

  3. #3
    ********* Genius Mike's Avatar
    Join Date
    Apr 2001
    Location
    Canada
    Posts
    5,458
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No idea but.. why not set a cookie on the second page, and when they press the back button, there won't be any submit button if the cookie is present. (make it last a couple hours i guess)
    Mike
    It's not who I am underneath, but what I do that defines me.


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
  •