NYCPHP Meetup

NYPHP.org

[nycphp-talk] Sporadic problems with forms

Allen Shaw ashaw at polymerdb.org
Fri Feb 1 14:54:13 EST 2008


Mary Beth Kooper wrote:
> I have a cmu that I have taken over.  The forms in this cmu are in frames.
> Every once in a while, a 2nd update is submitted to the mysql database with
> blank data fields.  I thought it might be an issue with ie, but it has now
> also happened with firefox.  The users swear that they are not refreshing
> the pages or hitting submit more than once.  Any clues to why this may
> happen are greatly appreciated.
>   
Hi Mary Beth,

In my experience "mystery problems" like this one are almost always 
being done by the code itself -- some function is being called twice, or 
an ancient dummy function that was never removed is being called only in 
certain circumstances.  Unfortunately the only way to find something 
like that is to get in there and untangle the code.  You *might* get 
some clues by looking for patterns in those error cases.

On another note, it would be better for your application if this kind of 
thing doesn't happen /even if/ the page is reloaded -- that is, the 
application should be fixed to avoid repeat processing on a refresh.  
Depending on how convoluted the codebase is, this may be something you 
can add in and thereby either solve the problem or at least eliminate 
page refresh as the culprit.

- Allen


-- 
Allen Shaw
slidePresenter (http://slides.sourceforge.net)




More information about the talk mailing list