Posted by chimambo on 05/18/07 11:02
Hi Everyone,
I have a huge problem. I am trying to get two corresponding variables
from a Checkbox and a Text box. e.g. If I check a value, say:
enrolled? [] (checkbox) then I have to put the date enrolled as a
text. So when inserting in a table I want the enrolled to correspond
to each date. Here is what I am trying but not working (In the echos
is where I am trying to have the values into the table):
while (list($key, $val) = @each ($box))
{
echo "$val";
while (list($key, $v_val) = @each ($dose))
{
echo "$v_val";
}
}
echo "<form method=post action=''>";
echo "<table border='0' cellspacing='0' style='border-collapse:
collapse' width='100' >
<tr bgcolor='white'>
<td width='25%'><input type=checkbox name=box[] value='John'></td>
<td width='13%'> John</td>
<td width='12%'><input type=text name=date[] size=8></td>
<td width='25%'><input type=checkbox name=box[] value='Peter'></td>
<td width='13%'> Peter</td>
<td width='12%'><input type=text name=date[] size=8></td>
.......
......
[Back to original message]
|