From: | Frank Bax <fbax(at)sympatico(dot)ca> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Form Design Advice |
Date: | 2005-03-01 21:52:13 |
Message-ID: | 5.2.1.1.0.20050301164225.04122080@pop6.sympatico.ca |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
At 03:39 PM 3/1/05, operationsengineer1(at)yahoo(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Keith Worthington | 2005-03-01 22:03:21 | Re: Form Design Advice |
Previous Message | Sean Davis | 2005-03-01 21:41:46 | Fwd: [GENERAL] Novice Question |