![]() Topic awaiting preservation: another question (sorry) . . . (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: there...no..there..... |
![]() Still working with the same PHP script, this time I have something different about it though. |
Maniac (V) Inmate From: under the bed |
![]() Basically when you hit refresh it is resending the variables, so it enters the info again. |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() There's a couple of techniques for this. One is to use a cookie to prevent reposting within a small amount of time. |
Maniac (V) Inmate From: there...no..there..... |
![]() ah, the ol' hidden field trick |
Maniac (V) Mad Scientist From: 100101010011 <-- right about here |
![]() Oh absolutely, the trick here is just creating the timestamp earlier. What you do is every time someone goes to the "form" page you create the timestamp there, then pass the timestamp to the page which processes the form (I think it's "posts.php"). This way you should have a single unique identifier for each visit to the form that you can use to make sure there is only one submission per form use. |
Maniac (V) Inmate From: there...no..there..... |
![]() Yes, it makes sense. I thought I was reading (and understanding) what you were saying. So I just pass the variable from the form to the posts.php page. Then in the posts.php page, before I actually create the file, I check to make sure that it is NOT there. If it is not then I create it, if it is there, don't create it. |