All,
I know the first part of my question isn't PHP-based but the 2nd part is. Firstly, I am creating a form that allows people to get register for cruises. I have a drop down list with numbers 1 - 4 for the # of passengers. What I need to be able to do is have someone choose the number and then have the form show up accordingly with a place for information about each passenger. Any guidance here would be greatly appreciated as I'm sure it's javascript; I'm just not good with the language.
Secondly, I need to store all the information regardless of how many passengers and pass it to the next page of the form and subsequently onto the processing script. I'll be using sessions to carry the data across the pages but my question is do I just put all the passenger data into an array, called passengers, in the session? I know that to put elements from a form into an array you would do something like:
Name
<input type="text" name="passenger[]">
But if I have multiple elements would I go as far as to do this:
Name
<input type="text" name="passenger['name']">
Location
<input type="text" name="passenger['location']">
And again, if so, my question lies in putting it into a session and handling multiple passengers.
I hope this was clear enough to understand.
TIA!