2
2obvious
Despite my best efforts, I cannot prevent bogus duplicate records in my
database. I have a routine that compares against similarities,
presenting an alert page with examples when there is a regular
expression match. It works brilliantly.
Get beyond this page, however, and anytime one submits, goes back in
history, and submits again, there is a duplicate. (Questioning why
someone would do this will not solve my problems--I'm just trying to
make things bulletproof.)
I can only think of two methods to solve my problem, neither of which
seems practical. I was hoping for some outside insight.
Method 1: kill the browser history, making it impossible for my users
to go back and resubmit. Due to security issues, the only way I know
of pulling this off is indirect and annoying: a pop-up.
Method 2: check every field of every record for an identical match each
time. This would probably slow the server to a crawl.
I'm using hidden form fields to pass data, if it helps. But I'm
storing them in a globally-used server side include. I did a brief
experiment with saving to a session variable and got the same results.
But I don't have any experience with session variables, so perhaps I
didn't try hard enough?
database. I have a routine that compares against similarities,
presenting an alert page with examples when there is a regular
expression match. It works brilliantly.
Get beyond this page, however, and anytime one submits, goes back in
history, and submits again, there is a duplicate. (Questioning why
someone would do this will not solve my problems--I'm just trying to
make things bulletproof.)
I can only think of two methods to solve my problem, neither of which
seems practical. I was hoping for some outside insight.
Method 1: kill the browser history, making it impossible for my users
to go back and resubmit. Due to security issues, the only way I know
of pulling this off is indirect and annoying: a pop-up.
Method 2: check every field of every record for an identical match each
time. This would probably slow the server to a crawl.
I'm using hidden form fields to pass data, if it helps. But I'm
storing them in a globally-used server side include. I did a brief
experiment with saving to a session variable and got the same results.
But I don't have any experience with session variables, so perhaps I
didn't try hard enough?