Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8251317
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T00:11:48+00:00 2026-06-08T00:11:48+00:00

I’ve obviously missed something somewhere. In some way a customer has managed to do

  • 0

I’ve obviously missed something somewhere.

In some way a customer has managed to do a booking twice within a 11 seconds delay (checked time). My first though was that the user might have done the booking, then backed in the browser and done the booking again. However this is not possible since I had at least 2 validations which I know would prevent this behavior.

The only conclusion left for me is if the customer tried to submit a booking, our webservice somehow froze in maybe 11 seconds, the customer aborted the request and submited again, therefor allowing these 2 bookings to happend at the same moment.

Apart from that, I got no idea what could cause it. Delay in MySQL insert perhaps?

So basicly what I wonder mostly is;
What can cause a form to get submited and executed twice, with the second one bypassing all required validation?

Current workflow of my form

A user submits data in input fields, and then submits them. My system validates all of these inputs and check for both a unique code to make sure that it’s not used twice through a MySQL call. It also makes sure the number of seats available is equal or greator than then amount of seats booked.

In this mentioned case, both the same code was used and the seats over extended allowed limit.

Basicly the booking won’t be inserted into MySQL unless the POST is validated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T00:11:49+00:00Added an answer on June 8, 2026 at 12:11 am

    My system validates all of these inputs and check for both a unique
    code to make sure that it’s not used twice through a MySQL call.

    Sounds like you have a concurrency issue. Do you lock the table while doing the checks/insert?

    In theory, if two executions occur at the same time, they will both have a unique ID and be within the seat limit, so both insertions will be allowed to proceed (and thus succeed).

    Here is a diagrammatic way of what I am thinking:

    POST 1                  POST 2
    Unique ID: 1234         Unique ID: 1234
    Check if ID is present  Check if ID is present
    ID is not present       ID is not present
    Check if seats left     Check if seats left
    Make insert             Make insert
    

    The second make POST 2 should not be allowed to begin it’s unique ID check until the table is unlocked, i.e. POST 1 has finished it’s insert.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
In my XML file chapters tag has more chapter tag.i need to display chapters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.