Solved

Getting multiple transaction postings

Posted on 1998-05-14
3
167 Views
Last Modified: 2013-12-25
Processing a cgi form in PERL, I am finding duplications (2x & 3x)  of the same record
appearing in the database. Believe the user holds the key down too long or perhaps
presses the submit key multiple times. How can I prevent these multiple transactions?
I'm a novice in PERL & do not know the C language equivalent to flushall(); could that
be the problem?
0
Comment
Question by:lshaffer
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 28

Accepted Solution

by:
sybe earned 70 total points
ID: 1828535
I don't think you can prevent it completely. What happens is when a user clicks on submit, the form data are send to your server, which then calls your perlscript. The sending takes time, depending on the speed of the connection and the amount of data send.

Then the script starts processing the data, which also takes some time, and when it is finished it sends the respons to the user.

Depending on how much data there is in the form, this can take a while, and the user will keep on seeing the form. Being impatient he might hit the submit button again, and send the data again.

One option to speed up the respons to the user is to send a first respons at the start of the perlscript, so before processing the data. But this might not be enough to prevent the user to get impatient.

So there is probably nothing left to do but make it easy to remove double transactions from the database.

If you use other, client side ways to make the form disappear when the user submits the form (for example using javascript) you  might miss some of the forms submitted as the data are lost in cyberspace.










0
 
LVL 6

Expert Comment

by:alamo
ID: 1828536
Another possibility is that your form is using the GET method rather than the POST method to submit its data. A GET form will be resubmitted with no warning to the user when it is accessed via a bookmark, reloaded, or even sometimes by pressing the BACK button. A POST form will warn the user before resubmitting. The user could still resubmit it if they want, but that would be rare- resubmissions as you describe are usually accidental.
0
 

Author Comment

by:lshaffer
ID: 1828537
This may be a workable solution. Time will tell. Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this tutorial I will focus on how to use WhizBase as a tool for sending ICQ messages to ICQ. Here I will use a new technology in WhizBase, published in WhizBase 5.1 version. In this tutorial I will use 3 files, pager.wbsp for the processing, e…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

737 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question