Forums

conflicting two forms problem

mja1356 24 Aug, 2009
Hi
I have two form.a form that i call it purchase when a user fill this form and submit it some credit subtract from his credit in database.
there is another form i call it ACT and when administrator submit it some credit add to user credit.
Now my problem is when i (admin) submit second form and after some second(less than 30 sec) a user submit first form it takes old credit to calculate.
It seems that some time required to submit data to database and if one user submit first form during this delay time it calculate old credit.
do so sinh, do so sinh cho be, quan ao so sinh, do dung cho be, do lot, quan ao thoi trang, quan ao nu, ban buon quan ao, thoi trang cong so, vest cong so, ban buon quan ao, do lot
now my question is can i disable first form to submit for 30 sec after seconf form submitted.
Or there is another answer.
TNX
GreyHead 24 Aug, 2009
Hi mja1356,

Database save is usually very quick. It sounds as though you need some server side validation on the second form to check that the credit is correct.

Bob
mja1356 29 Aug, 2009
Hi Bob
I can't understand what kind of server side validation you mean.
Is there a way when i submit a form I can disable another form from submitting for some time?
mja1356 30 Aug, 2009
I'm so sorry to repeat my question but this issue create big problems for me.
Now my question is (simple) IS THERE ANY WAY TO DISABLE ANOTHER FORM FROM SUBMITTING AFTER ONE FORM SUBMITTED FOR SOME TIME?
thank you
GreyHead 01 Sep, 2009
Hi mja1356,

Try adding <?php sleep(30); ?> to the OnSubmit Before Box.

I still think it's pretty unlikely that slow db saves are the problem here.

Bob
This topic is locked and no more replies can be posted.