Determining if POST variables exist after form submission
Posted: Thu Jul 31, 2008 11:26 pm
Hi everyone, I wrote a form with dynamic input creation. The first input in a section is named section_0 with each input added named successively, section_1, section_2, etc.
I've been trying to write a while loop that cuts off when it encounter a POST variable that's not set, but haven't been able to dynamically reference the $_POST variable['section_?']. This is something like I've been trying:
while (ISSET($_POST['{"deliverable_".$count}'])
{
$deliverable[$count] = $_POST['{"deliverable_".$count}'];
$count ++;
}
Any suggestions on how to do this or do it better?
I've been trying to write a while loop that cuts off when it encounter a POST variable that's not set, but haven't been able to dynamically reference the $_POST variable['section_?']. This is something like I've been trying:
while (ISSET($_POST['{"deliverable_".$count}'])
{
$deliverable[$count] = $_POST['{"deliverable_".$count}'];
$count ++;
}
Any suggestions on how to do this or do it better?