I have a form with a checkbox
on it. If the checkbox is checked the action page puts a not in the parent
table and the user is redirected to another page. If the user does not put
a check in the box, they are supposed to fill out the rest of the form. On
this form are formfields which insert records in child tables as well as
updating some information in the parent table. I want the action page
to:
Check to see if the
first checkbox is checked
if checked
insert a record in the parent
table
put no in the appropriate
field
Send user to another page
If not checked
insert a
record
put yes in the
appropriate field
Continue with the rest of the code on the
page
Rest of
code:
Insert into a child
table putting the PK from the Parent table into the FK field of the child
table
Update some fields
on the Parent table
Insert into a child
table putting the PK from the parent table into the FK field of the child
table
I have gotten around
this before by having the user submit the checkbox and then go on and submit the
rest of the page.
Is there a way to do
it all on one action page thereby only using one submit
button?
