I am in the process of building a "hosting" type sign-up wizard form. I am stuck on a way to do this. I have been trying for a few weeks and have tried various methods with near success, but each time I get close, some other issue makes me re-think my design. I am interested in getting feedback on my issue (maybe I am over-thinking it?).
I am currently using _SESSION vars for each form page, and using a switch statement to determine what "step" to process.
Problem #1 - For example, one of my products does not need the "domain registration" form, another one does. I was thinking I needed some sort of array for each product, and that array would contain a list of each "step" that product requires. It would then walk through the array and run each step required. This sounds good in theory, but I have not been able to get it working properly, especially when the user goes back and forth through the forms. I lose my steps (tried using next() prev() on the steps array). I need to be able to tell the next "step" function what the previous step is and what the next step is so I can have the Next/Prev buttons work properly when clicked on.
Any ideas?