This is difficult to explain, please bare with me. I am creating a form, and part of that form will be a list of check boxes. Those check boxes are created by using the following:
My question is, since the check boxes (and their names) are created dynamically how would I go about getting their values after the form has been submitted? In other words, is there a way to create a variable name dynamically and then display or pass its value?
Code:
$times = $badge->getTimeFrame();
foreach($times as $id => $value)
{
echo '<input type="checkbox" name="chkTime' . $id . '" value="' . $id . '">' . $value . '<br />';
}
My question is, since the check boxes (and their names) are created dynamically how would I go about getting their values after the form has been submitted? In other words, is there a way to create a variable name dynamically and then display or pass its value?