Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: feedback form

  1. #1
    New Coder
    Join Date
    Jul 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    feedback form

    I have a feedback form(feedback.php) which fires a mail function.
    After successful firing of mail it shows a javascript alert
    "tahnk you" and redirected to a new page.

    but when i press back the same javascript alert appears fires the same mail and what i don't want.
    plz help me.thanx in advance.

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    Hey there,

    from my understanding.. in most browser .. pressing the back button will run the form again - meaning it sending the feedback again.

    A nasty way round this would be to put in some code that reconises if the page has already been loaded..or maybe even flood control?

  • #3
    New Coder
    Join Date
    Jul 2004
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    can u help me by giving some examples(code).
    thanx in advance

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Posts
    905
    Thanks
    23
    Thanked 5 Times in 5 Posts
    use the $HTTP_REFER variable to call the refering address and on your form page put something like

    PHP Code:
    if $http_refer form_completepage.html 
     
    { echo(" You have pressed the back button") };
        else  { echo (
    "YOUR HTML FORM HERE"); } 


  •  

    Posting Permissions

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