An idea to stop double posts...

BoberFett

Lifer
Oct 9, 1999
37,562
9
81
I'm not a Cold Fusion developer, so I'm not even sure if this is possible. I'd assume though that you have a way in CF of generating a GUID. If so, couldn't you send a GUID back in the HTML for each reply, private message, etc. Then when a reply was sent, return the GUID which will then be inserted in the database along with the message information. Then just make the GUID field unique.

Just an idea, do with it what you will.
 

Train

Lifer
Jun 22, 2000
13,587
82
91
www.bing.com
na i think it'd be easier to just check on each post submission if the exact same post was made within the previos minute or so.
 

Spicollidriver1

Senior member
May 30, 2000
462
0
0
one of the ubb sites I go to has it so it just won't allow you to post twice within like 10 seconds or somehting. Don't remember the exact time but it does prevent double posts.
 

downhiller80

Platinum Member
Apr 13, 2000
2,353
0
0
Why have a 10 second limit? Why ot just compare it to the previous post and reject if they're the same? Seems just too easy really....

Seb
 

BoberFett

Lifer
Oct 9, 1999
37,562
9
81
I suggested a GUID because it's faster than comparing a huge string, such as the text of the message since it's a unique value.
 

wolf550e

Golden Member
May 22, 2000
1,370
0
0
checking with the last wont work because there are many people posting at once so in the 1/1000 of a second between this and the second post which are double there might be 2 other postes on different threads or even the same thread. you have to do what the first guy offered olthough i have no idea what it is. it is faster by his explanation than actualy checking it with each post if its the same...
 

Wizkid

Platinum Member
Oct 11, 1999
2,728
0
0
Yeah, a GUID would probably be the most efficient way of doing it.... I had another idea for this. I haven't touched javascript in a while, but is it possible to "disable" a button in js? If so, then just make the button disabled after it is clicked to submit the form...

If this doesn't work then I like the GUID idea :)
 

Possessed Freak

Diamond Member
Nov 4, 1999
6,045
1
0
actually, checking the last work could be done on strict client side by using a cookie that over writes the previous cookie but before it does it compares itself to the old cookie. They would have some kind of checksum on it and if they match, the post does not occur...