|
Posted by rsvore on 03/04/07 22:39
"shimmyshack" <matt.farey@gmail.com> wrote in message
news:1173046817.151051.96630@n33g2000cwc.googlegroups.com...
> On 4 Mar, 17:30, "rsvore" <rsv...@sbcglobal.net> wrote:
> > I have a php form that runs through seven steps for the user to complete
the
> > form. During each step validation runs before the user can see the next
step
> > in the form, once completed there is a submit that send the info to a DB
and
> > displays a "thank you" as a final step. Once the Thank you is displayed
I
> > want to have a Yes and No choice for the user, if they select No I want
the
> > session to destroy so other users can not see the info the previous user
put
> > in the form by selecting the back button in IE. I don't want the destroy
to
> > happen until the "No" button is selected. Any help as to how to approach
> > this problem?
> >
> > Thanks,
> >
> > Rob
>
> It is a funny question really, since you obviously know how to code a
> multipage form, I am wondering why you ask?!
> If the form is already submitted at that point there doesnt seem to be
> much point keeping the data around anyway. Just call session_destory()
> however if you want the button to destory it like you suggest, why not
> think of the Thank you as the last-but-one page of the form, although
> the details have been added to the database, you can then add some
> logic to destoy the session if a further input of type="button" is
> submitted.
> Or have the form post to an entirely new page, perhaps one which
> destroys the session and then redirects them to something of interest.
>
Currently the destroy is at the end of the script but if I'm on step one of
the form and go to step two and decide to go back to step 1 by using the
back button in IE it destroys session the step1 values and I have to
repopulate the fields. I have an include that pulls the DB population script
so I will try the destroy there.
Navigation:
[Reply to this message]
|