Edit for solution:
I still don’t know why he is doing double recording, but so far I have done some hacks.
I added a UID token to the form, generated MD5 and saved it with a DB record. The script checks to see if the record already exists or not. If so, it cancels the record identifier if it does not add a new one, and then skips the identifier for final confirmation.
The form doubled even the UID, so I could catch it. If these were two different UIDs, then I might have problems, haha.
I would like the PeeHaa goto points, because if anyone else finds this question, I want other people to also know that Post, Redirect and Get are good coding practices. (Put a script in your insert, go from page to confirmation page and use GET to display values).
Previous Content:
OK, that’s pretty simple.
I know that a lot of times have already been asked here, but none of the existing questions are relevant to my problem.
The basic form of HTML. No fancy jQuery or anything else.
<form id="attendee_confirm" class="regform" method="post" action="http://url.com/wip/events/register/?"> <input name="attendee[0][first_name]" value="Bruce"> <input name="attendee[0][last_name]" value="Wayne"> <input type="hidden" name="reg_form" value="true"> <input type="hidden" name="questions" value="true"> <input type="hidden" name="action" value="done_confirming"> <input type="hidden" name="event_id" value="1"> <input type="submit" name="mySubmit" id="mySubmit" value="Confirmed"> <input type="button" value=" <-- BACK " onclick="history.go(-1);return false;"> </form>
WHY does my form publish data twice? I really don't get it.
This is a confirmation form. The user is entered here after filling out the first form to confirm the names.
The first form works fine and displays relevant information. The second is to confirm and send the email / process.
The form is submitted twice, and I only ever see the result of the second attempt. I can not get any conclusion from the first.
Because of this, if I try to add a catch catch session token to the form to try to catch duplicate entries, the first attempt is allowed, but the user sees only the second catch.
Perhaps this is a problem with the server? ModSecure is running on my server (which has annoyed me lately) and I'm really disappointed. I get double occupation for my events when I shouldn't ...
Change information:
This happens in all browsers, so it is browser independent.
I also tried to configure the script capture to be redirected after receiving the information for processing, but, as I mentioned, the data is first sent using an invisible thing, and the result that the user sees is actually the second data, Not the first set. Still doubles. OWF ..
Server logs were a bust. This happens in one post. I am going to double check scripts that can be executed twice .....