I'm not sure the best way to ask this question since I am still learning PHP, but here goes.
I've got a number of functions setup, and I have an "action" variable that I am trying to use to make the page execute a certain set of functions based on my action variable. (Hope that makes sense)
My question is, how can I get this action variable to check when a user the submit button, and also check certain criteria on the form?
Thanks for any suggestions!!!
if ($_POST['action'] != "") {
$action = $_POST['action'];
}
if ($action == "") {
// retrieve data from database to use in working space -- and continue to step1 with the form, etc.
database_errors();
database_open();
check_variables ();
database_queries();
database_close();
$action = "step1";
} else {
// trying to setup environment with previous form data here.
get_superglobal_vars_from_POST( --A BUNCH OF VARIABLES--);
}
//Step 1 - Blank form
if ($action=="step1") {
html_header();
print "This is step 1";
form_logo();
form_employee();
form_work_order();
form_work_order();
form_work_order();
form_work_order();
form_work_order();
form_work_order();
html_table_form_footer();
check_variables ();
html_footer();
}
// More steps in a similar fashion...