So, if I do this -- write each to the database, how are they going to review
at the end and pick and choose which employees they didn't mean to add?
Write scripts for deletion?
"Roger Balliger" <Roger@i...> wrote in message
news:97836@j...
>
> I would make the ADD and DONE buttons both write the existing form data to
> the DB with one minor difference. When the ADD button is pressed, the
> current data gets written to the DB and the page is refreshed. When the
> DONE button is pressed, the current data gets written to the DB and then
> redirects to the Thank You or Closer page.
>
> Roger
>
> -----Original Message-----
> From: Greg Griffiths [mailto:griffiths@x...]
> Sent: Wednesday, August 29, 2001 11:31 AM
> To: javascript
> Subject: [javascript] Re: Repeating Form Information
>
>
> Why not put each record into a unique cookie which you could get on the
> server side e.g. record1 ... recordn.
>
> At 12:49 29/08/01 -0500, you wrote:
> >I have a form that I want to ask for the following information:
> >
> >Employee Name
> >Date of Birth
> >Sex
> >More stuff, etc...
> >
> >Then, at the button I want buttons for
> >
> >Add Additional Employee
> >Done Entering Employees
> >
> >The Done would act as a submit button -- no issue here
> >
> >However, what do I attach behind the Add button? I don't want anything
> >written to the database until they choose Done and I don't want to have
to
> >create 100's of pages to anticipate how many employees they might add...
> >
> >So, how do I redisplay the same screen and yet keep capturing the data
they
> >are entering in variables? At the end each Employee they add would be a
> >record in the database.
> >
> >Here is some samples of the code I have right now:
> >
> ><FORM NAME="Census" METHOD="post" ACTION="partners_page5.php">
> ><table width=600 border=0 cellpadding=0 cellspacing=0>
> ><tr><td>Employee Name<td><td><INPUT TYPE="text" NAME="Emp_Name" SIZE=45
> >MAXLENGTH=45></td></tr>
> ><tr><td>Date of Birth<td><td><INPUT TYPE="date" NAME="Emp_DOB"</td></tr>
> ><tr><td>Sex<td><td><select name="Emp_Sex">
> > <option value="-1">Please Select One...</option>
> > <option value="Female">Female</option>
> > <option value="Male">Male</option>
> > </select></td></tr>
> ></table>
> ><INPUT TYPE="SUBMIT" name="submit" VALUE="Done Entering Employees">
> >
> ><!-- This code below captures the values from pages past and moves them
> >along the food chain using PHP -->
> ><?
> >if ($HTTP_POST_VARS) {
> > while (list($lvar, $lvalue) = each($HTTP_POST_VARS)) {
> > echo "<INPUT TYPE=HIDDEN NAME='$lvar' VALUE='$lvalue'>\n";
> > }
> >}
> >?>
> >
> >All help is greatly appreciated! I think this might be something of a
> >shopping cart mentality???
>
>
>