[cgiapp] A new way to do form processing

2004-10-22 Thread Drew Taylor
In my web apps I follow the common principle of submitting a form back to itself, processing, and then redirecting to a new page. So my runmodes typically look something like this: # In my application module sub rm1 { my $self = shift; # is_form_submitted() just looks for the presence of a

Re: [cgiapp] A new way to do form processing

2004-10-22 Thread Jason Purdy
Maybe I'm missing something and it's probably a personal preference, but I enjoy separating all those runmodes (one for display and another for processing). My forms also submit to themselves, but they have a hidden runmode parameter to go to the processing runmode directly. Essentially, you

Re: [cgiapp] A new way to do form processing

2004-10-22 Thread Drew Taylor
On Sat, 23 Oct 2004 10:23:00 +1000, Ron Savage [EMAIL PROTECTED] wrote: On Fri, 22 Oct 2004 12:40:38 -0400, Drew Taylor wrote: Hi Drew In my web apps I follow the common principle of submitting a form back to itself, processing, and then redirecting to a new page. So Common principle?

Re: [cgiapp] A new way to do form processing

2004-10-22 Thread Ron Savage
On Fri, 22 Oct 2004 22:05:37 -0400, Drew Taylor wrote: Hi Drew  I'm curious how you've handled code that adds a new row in the  database. What do you do to prevent a refresh from adding a  duplicate entry? The redirect is a simple solution that solves a  common problem: Of course refreshing is