Hi All,
I want to gather 65 variables from a POSTed form.
The variables are named $c06_min_01 - $c06_min_65.
I was hoping to loop through and gather them using the following code:
for($i=1; $i<66; $i++)
{
if($i < 10)
{
$questionnum = "c06_min_0" . $i;
}
else
{
$questionnum = "c06_min_" . $i;
}
$$questionnum = $_POST['$questionnum'];
}
Now this doesn't seem to be working and I think the error lies with the $_POST['$questionnum'] part of the above.
Is there anyone who could tell me why my code is failing and suggest how I could fix it?
Thanks,
Owen