Good Day Folks,
I have a dynamic text boxes that vary depending on users choice. I can get already its values using this code:
<?php
$itemCount = count($_POST["process_step"]);
$itemValues=0;
$query = "INSERT INTO process (id_ref, process_id, hot_cold, temp) VALUES ";
$queryValue = "";
for($i=0;$i<$itemCount;$i++) {
if(!empty($_POST["process_step"][$i]) || !empty($_POST["hot_cold"][$i]) || !empty($_POST["temperature"][$i])) {
$itemValues++;
if($queryValue!="") {
$queryValue .= ",";
}
$queryValue .= "(LAST_INSERT_ID()" . ", '" . $_POST["process_step"][$i] . "', '" . $_POST["hot_cold"][$i] . "', '" . $_POST["temperature"][$i] . "')";
}
}
$process = $query.$queryValue; //value ng ii-INSERT
?>
and the sample output of this is:
INSERT INTO process (id_ref, process_id, hot_cold, temp) VALUES (@ref_id, '1', '', '123')
that I will now use as sql statement to insert in my database.
My problem is this, my form have 4 part, the dynamic text box is at the 3rd form. I have a Back function where in the user can go back to previous forms if they forget or need to edit something. When I was at form 4, when I hit the BAck Button, I cannot fetch back the value of the dynamic textboxes.
any ideas on how??
Thanks