HI,
this is a very hard problem for me.
i want to display a set of dynamically generated input form in this case check boxes (from mysql).
so basically i have:
$n=mysql_num_rows($result);
$c=1;
$b=box;
while($c <= $n)
{
$a=$b.$c; // which give me box1, box2 etc
$row=mysql_fetch_array($result);
print(" <input type=checkbox
name=$a> ")
$c++;
}
SO u see the problem, since i want to generate it dynamically the name property in the input type has to be a variable(in this case $a)
And when i send this to a php script to determine which box is checked, the problem occured!
i use
if(isset($box1))
//since $a value is box1, box2 and so on
/*this works fine! BUT i need to check it dynamically depending on the number of check-box generated
therefore i tried to use the same appending method as in the form page $a=$b.$c thing .
BUT it doesn't work
so if(isset($a)) Fails big time
I think i already run out of idea...
Anyone outhere who has attempted this kind of dynamically generate input form ? could you give me some idea how to do it correctly?
or is this imposssible?
thanks