Hi all - I'm new here, looks like a very helpful group. Thanks for the resource!
I have a multi-page form which consists of a 'backbone' script and multiple scripts for each step:
This is an EXTREMELY simplified overview of the backbone (there are actually 14 steps with possible loop-backs and branches)...
if (isset($lastthing))
{
$step = "Done";
}
elseif (isset($secondtolastthing))
{
$step = "Almost Done";
}
else
{
$step = "Starting";
}
then I look up $step in a MySQL table, put that row in an array and ...
run a pre-form script that establishes default values
display the form
validate the form data with a post-form script that is called with the Form Action
if data is not valid, loop back to this step again with an error message
if data IS valid, proceed to the next step and call the backbone script again.
I'm looking for a 'better way' to structure this whole thing. The browser's Back button is NOT my friend. Lots of unpredictable things happening when the end user takes navigational 'adventures' off the planned route.
Anyone have a tested & proven way of dealing with this type of application or a place I could 'read up' on best practices?
Thanks for whatever help you send my way!