in reply to db user and cgi pardigm
Is there a better approach?
The only good reason I can think of to use a file and delayed update if if you have really big tables and lots of indexes so the updates work better as a batch with a disable index, insert, reneable index type approach.
Why not just:
use CGI; use DBI; my $q = new CGI; if ( $q->param('submit') ) { my ( $good_data, $errors ) = validate( $q ); if ( $errors ) { show_form( $errors ); } else { update_db( $good_data ); my $pass = get_password(); show_success( $pass ); } } else { # default to show the form show_form(); } exit 0;
cheers
tachyon
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: db user and cgi pardigm
by Anonymous Monk on Mar 01, 2004 at 01:36 UTC | |
by Trimbach (Curate) on Mar 01, 2004 at 05:37 UTC | |
by astroboy (Chaplain) on Mar 01, 2004 at 10:59 UTC |