Ok so on the initial page I have auto incremented hidden input box names so it appears like "cart0Pizzas", "cart1Pizzas", "cart2Pizzas" etc. I am posting these to a process page (user won't see this page - is just so i can post the data and store it into sessions.
I want to store the appropiate post data into auto incremented sessions. So when the user clicks on the submit button which is in the same form as for example "cart24Pizzas" it will go into $_SESSION['cart0'] if that one isn't set. If it is, then it can go into $_SESSION['cart1']. If that is set, it will go into $_SESSION['cart2'] and so on.
How can I do this? Thanks in advance.