Re: Hold that insert!

From: Date: Tue, 27 Mar 2001 17:04:44 +0000
Subject: Re: Hold that insert!
Groups: php.db 
Request: Send a blank email to php-db+get-7888@lists.php.net to get a copy of this message
I like your simplicity and straightforwardness. My code tends toward: switch($submit) { case: "Accept": .. insert record break; case: "Delete": .. delete record break; case "Cancel": .. cancel record changes and return to previous condition break; } if($submit) { show form } else { show list } where list is a display of the records in the database (browse) and the form is a one record dataentry/modification/delete form. On Tuesday, March 27, 2001, at 10:46 AM, Boget, Chris wrote: > I do something similar. However, my layout is like this: > > ---------- > > if( isset( $submit )) { > errorChecking(); > > if( $noErrors ) { > doDBInsert(); > header( "location: blah" ); > exit(); > > } // end if( $noErrors ) > showErrors(); > > } // end if( isset( $submit )) > > displayForm(); > > In Light and Love EaTrom Order of Melchizedek Michael's Legions ------------------------------------------------------------------------- EaTrom's Site: http://www.blazing-trails.com Spirituality & Conspiracy -------------------------------------------------------------------------

« previous php.db (#7888) next »