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
-------------------------------------------------------------------------
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]