[Phplib-users] Is there a way to save sessions between page open and close?
Brought to you by:
nhruby,
richardarcher
From: Herouth M. <he...@ti...> - 2004-07-05 14:33:22
|
I have a captcha system, wherein a php-generated image generates a number and displays it, and the user has to respond with the same number. If he does, a sensitive operation is performed, which we want to avoid being performed several times in a row. We find that if the user clicks the submit button on the form several times in a row, it creates several connections, all of which check the number and do the operation. Since the page does not reload between these submissions, the number does not get replaced. I thought I'd unregister the number directly after I verify that it's the right one, so that the next connection made will not reach the sensitive part, because its comparison will fail. However, since the data is only saved in the session at the end, when I do the page_close(), this is not working. I'd like to be able to control when the session is saved, so that only the first connection will be able to access that number. Any ideas? Herouth |