Forum Moderators: coopster

Message Too Old, No Replies

signup form with multiple pages

with the help of sessions

         

12inch

2:24 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



I am trying to create a signup form with multiple pages. I want to store the filled in values with sessions, not with hidden fields.

I know how sessions work, but I don't know how to preserve the values between the pages of the signup form. I.e. when I go from page 1 to 2, then I use a submit button. But I want to be able to go back and change what I have filled in in page 1. But do I have to submit again?
Because If you want to do this without a submitbutton, say a link, then you can't say if you use POST.

lorax

3:34 pm on Apr 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



>> But do I have to submit again?

Yup. If you're using the session vars to populate the form fields then you'll need to submit the form again to pass the new values on to form handler. Or am I not understanding what you're trying to do?

12inch

4:54 pm on Apr 19, 2004 (gmt 0)

10+ Year Member



Ah ok.

But let's say I have 4 pages in my signup form and I am at page 2. Then I need a submit button to go back to page 1 and a submit button to go forward to page 3.

Is it possible to have 2 submit buttons with 2 different form actions?

PCInk

5:00 pm on Apr 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You can't have two submit buttons with two different actions (they must go to the same script filename), but you can pass the value of the submit button which was pressed.

<input type='submit' name='s' value='Next'>
<input type='submit' name='s' value='Previous'>

When the button is pressed, the variable 's' will contain either 'Next' or 'Previous' depending on which was pressed.