registration form?????

Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: registration form?????

  1. #1
    Join Date
    Dec 1969
    Posts
    359

    Default registration form?????

    Hi there <BR>I have a registration form after the user has registered I show them like a thankyou page my problem is that if the refresh button is pressed while on that page it will create another record of the same registration in the DB.<BR>How can i avoid that???<BR><BR>thanx<BR>Unreal

  2. #2
    Join Date
    Dec 1969
    Posts
    10,852

    Default RE: registration form?????

    Form page -&#062; Submit to page that puts the info in a db -&#062; redirect to a thank you page.

  3. #3
    Join Date
    Dec 1969
    Posts
    359

    Default RE: registration form?????

    Thanx it makes sence cause I have the thankyou message on the same page.<BR>thanx for the input<BR>unreal

  4. #4
    Join Date
    Dec 1969
    Posts
    11,334

    Default And if the user hits the back button?

    Tch.<BR><BR>2 options:<BR><BR>Use the FAQ from some really cool Ghost that says how to detect if a record is already in the database<BR><BR>Set a session var/cookie, and if the value is true or so, don&#039;t do the insert


  5. #5
    Join Date
    Dec 1969
    Posts
    10,852

    Default If the user hits the back button....

    Then you redirect back to the Thank You page, after checkng the referrer and acertaining that it isn&#039;t the form page.

  6. #6
    Join Date
    Dec 1969
    Posts
    11,334

    Default Really?

    Does the referrer update correctly? I thought that only happened during a 200 response? Redirect sends a 302... but then again, he wouldn&#039;t be able to set cookies with a redirect.<BR><BR>Who knows. It seems this solution is more convoluted than the cookie thing.

  7. #7
    Join Date
    Dec 1969
    Posts
    11,334

    Default Or what if...

    What if the user keeps hitting the submit button? What then, monsignor?<BR><BR>Tch.<BR><BR>This is the second time I&#039;ve beaten you.<BR><BR>Hail to the king, baby.

  8. #8
    Join Date
    Dec 1969
    Posts
    10,852

    Default Actually....

    Mine was just a guess. Now, I&#039;ve tested it. I can&#039;t hit the submit button twice. If you do, it should still submit only once. <BR><BR>And, referrer or no referrer, if you hit the back button, it skips the processing page altogether, and goes straight back to the form page.<BR><BR>I win again. :-P

  9. #9
    Join Date
    Dec 1969
    Posts
    1,175

    Default RE: Actually....

    its not winning or losing that counts.<BR><BR>its how you play the game.<BR><BR>HM 1 : y&#039;all 0

  10. #10
    Join Date
    Dec 1969
    Location
    Los Angeles, CA
    Posts
    21,192

    Default You playing

    with yourself too much of late eh!<BR><BR><BR>:p<BR><BR>

Posting Permissions

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