We've all seen those messages on some websites warning not to click a button more than once or negative consequences, like paying a bill twice, may result. Sometimes we can cause these problems by hitting the back or refresh buttons. In this article I will explain a methodology whereby a site can ensure each form is submitted only once, thereby demonstrating that such warnings are unnecessary and, depending on the nature of the problems caused, worth repairing immediately. Let's begin by taking a look at the process we are studying: Form Submission. As pedantic as it may seem, it will be worthwhile to detail each of the steps in this process:
Since the item which changes does not depend on the form being submitted (e.g. it doesn't matter if it's a newsletter registration form, customer signup form, payment form, etc.), the item is not something which already exists and therefore must be created, so let's create a form variable called submissionId and assume it has the 3 properties mentioned above. So far, so good -- or so it appears! The third "property" is that "we can tell [it] changed", but "changed" is not a property of a variable, so we need to look at this more closely. In order to tell something changed, we must have a reference point, an answer to the question "changed from what?" This is where a session variable will come into play. If we define a session variable, say $_SESSION['nextValidSubmission'] and treat it as a reference point, we will have all of the tools necessary to protect our visitors. The idea will be to keep the session variable updated with the last submissionId sent out and change the submissionId each time it is sent out to the user. Then, if they try to resubmit the data, they will be submitting an old submissionId which doesn't match nextValidSubmission and we will know not to re-process this data. Let's look at this in terms of the processes:
Webmaster of script reference - The *NEW* PHP Reference & Tutorial Site For Non-Programmers
script reference
Dan Kennedy once said that if you can't make money... Read More
1. Many people are not getting good or complete advice.... Read More
Looks like every client wants a Flash site these days... Read More
Recently I was reviewing the keyword specific conversion rate data... Read More
Setting up a website is the very first step of... Read More
In the region where my company is located, South Bend,... Read More
A common dilemma most small and medium businesses face when... Read More
What is the most important part of your online business?Many... Read More
Like any area of business your website needs some effort... Read More
Think up a name and check if yourname.com is available.... Read More
A while ago one of my clients approached me and... Read More
Web templates by nature are created to aid and ease... Read More
Anyone who knows anything about web accessibility knows that images... Read More
If you are living in a country that its native... Read More
Alternate medicine finds its own place in the hearts and... Read More
An interesting eCommerce success factor that isn't precisely overlooked, but... Read More
A lot of people these days are interested in getting... Read More
Do you make your website just to entertain yourself or... Read More
Every business needs to know how it is doing. That's... Read More
With more and more countries around the world passing laws... Read More
When you publish a content site there are times when... Read More
The big thing these days is your ability to capture... Read More
There are many different traffic analysis tools, ranging from simple... Read More
So you have a good idea for a business and... Read More
In about the Time it takes to Watch a Reality... Read More
high-end home cleaning Bannockburn ..Recently I was reviewing the keyword specific conversion rate data... Read More
Although designing a great web site is an important part... Read More
When visitors add your web site to their Favorites or... Read More
What happened on your website yesterday? What about last week... Read More
Creating a content management system either from scratch,... Read More
When marketing your website, it's important to know which of... Read More
RIVERSIDE, CA August 4, 2004 ?- "Historically, small business owners... Read More
Like most average persons, I wanted some extra money to... Read More
Everyone wants one.Everyone wishes they knew how to make one.SOME... Read More
I recently helped my mom to launch a website (www.mom2me.com)... Read More
1. As the first step, "Hire a web designer."First create... Read More
Rosalind wants to share her inspirational poetry with a wider... Read More
In the time that I have been using the Internet,... Read More
I talk with so many people who have small businesses... Read More
Your website conversion rate should concern you. This simply refers... Read More
While creating a Web site may seem like... Read More
After deciding what kind of internet business you want to... Read More
Are you aware that 90% of the websites on the... Read More
First, an eye opener. Making your fortune through affiliate programs... Read More
In the big, wide online world there are millions of... Read More
One of the most useful features offered by some web... Read More
The cost of setting up a web site is dirt... Read More
Every good Internet business understands the value of conversions versus... Read More
When we review the sites of potential clients, there are... Read More
To the starting internet entrepreneur, there is nothing more discouraging... Read More
Web Development |