[eluser]september28[/eluser]
Hi there,
Just wanted to see what people do to handle different stages in a form process. For instance, when a user orders something they might first select the product, then they go to the invoice address, press submit and then a shipping form appears, the press select and based on the shipping address they have given, the price of postage and packaging appears, they press ok, then the credit card details then they press ok and finally the order is complete.
Just wanted to know how people deal with those different stages in a controller.
Do you save a flash_data session variable called stage and give it values 1,2,3,4,5 for each other the stages and then use if statements to discover which stage the user is at? e.g.
Code:
function test() {
if ($flash_data_var == 1) {
//display first stage of form process
}
if ($flash_data_var == 2) {
//process some first stage info and then show second stage of form process
}
etc...
}
Can anyone shed some light?
Cheers,
Dan