Women in Technology

Hear us Roar



Article:
  Handling Multiple Submits
Subject:   the server side solution is not sufficient
Date:   2003-05-17 03:23:19
From:   anonymous2
as the title said, the server side is not good enough, what if the concertgoer decided to rebook another ticket for her boy friend? the system will reject his booking requirement!


the better solution need a small tip:
1. we can add set an attribute to the seesion object. (e.g. ticketFormSubmit=false)
2. before we process the form data, we need to check that we are not process the same form request. (e.g. if (ticketFormSubmit==false))
3. if ticketFormSubmit is false, indicate that the user has submit the form in the right way. so we can process this form request. before your process the form data set ticketFormSubmit=true
4. if ticketFormSubmit is true, indicate that the user is not patient enough. he is resubmitting the form request! so just ignore this request.
5. after the form process or before the result page is sent back to concertgoer set ticketFormSubmit=false. notify the concertgoer she can rebook her tickets without any limited
6. congretulation yourself!


Eric Wong


Eric Wong