using session to store data and use at a later stage
Posted: Fri Nov 11, 2005 7:15 am
Hi there,
I am building an online insurance booking form which over several screens will take details of people to be insured.
On the first screen, the client specifies the amount of people he wants to insure. On the second screen I have used a loop to create the correct amount of spaces to take the details of each person he wants to insure.
Now where i'm getting stuck (and this is probably something strait forward) is how I store each of these person's details in the session and then recall them a couple of screens later to firstly confirm the client's details but then also to save onto the server for the insurance to be issued.
Information such as telephone number and address for example is easy because I know that there will only be one variable name to store in the session, but with the list of client's details I am not going to know how many there as that is controlled by the person entering in the amount on the front page.
I have got as far as creating a loop which as well as creating the correct amount of spaces for the details but it also names each text box a unique name i.e. name1, age1, name2, age2, name3, age3 etc.
Do I add something to the loop which will add each of the details to a session variable eerytime it loops?
Any help or suggestions would be really appreciated.
Many thanks
will
I am building an online insurance booking form which over several screens will take details of people to be insured.
On the first screen, the client specifies the amount of people he wants to insure. On the second screen I have used a loop to create the correct amount of spaces to take the details of each person he wants to insure.
Now where i'm getting stuck (and this is probably something strait forward) is how I store each of these person's details in the session and then recall them a couple of screens later to firstly confirm the client's details but then also to save onto the server for the insurance to be issued.
Information such as telephone number and address for example is easy because I know that there will only be one variable name to store in the session, but with the list of client's details I am not going to know how many there as that is controlled by the person entering in the amount on the front page.
I have got as far as creating a loop which as well as creating the correct amount of spaces for the details but it also names each text box a unique name i.e. name1, age1, name2, age2, name3, age3 etc.
Do I add something to the loop which will add each of the details to a session variable eerytime it loops?
Any help or suggestions would be really appreciated.
Many thanks
will