Re: Form Design Advice - Mailing list pgsql-novice

From Frank Bax
Subject Re: Form Design Advice
Date
Msg-id 5.2.1.1.0.20050301164225.04122080@pop6.sympatico.ca
Whole thread Raw
In response to Form Design Advice  (<operationsengineer1@yahoo.com>)
Responses Re: Form Design Advice
List pgsql-novice
At 03:39 PM 3/1/05, operationsengineer1@yahoo.com wrote:
>i ahve a form process that looks like this...
>
>1. display blank form
>2. perform insert after data is submitted (assuming no
>errors which i check for)
>3. perform select to get data entered
>4. save data in global session array
>5. redisplay the empty form (ready for new input) with
>the printed session array components (representing
>what was entered) above the form followed by "
>successfully entered."


You have it backwards.  This can all be done in a single script with this
structure:
1.  Check to see if there is any incoming data.  If there is incoming data,
validate it, and insert into your database.
2.  Display data from your database.
3.  Present an empty form.

In your form tag, use POST="" with null value, which causes results to go
back to same page.

Frank


pgsql-novice by date:

Previous
From: Sean Davis
Date:
Subject: Fwd: [GENERAL] Novice Question
Next
From: Keith Worthington
Date:
Subject: Re: Form Design Advice