Hi ,
I am trying to build form whihc has a checkbox arrays next to input boxes and i am using array to retrieve the values entered in each row selected
1, soem data
2, some data 2
3, some datea 3
so if the user select 1 and 2 , I want to get only the value in 1 and 2.
My chekc box works fine but i get all the input values in1, 2 and 3
my code is listed below and i also have screen shot of my form.
You help is greatly appreciated.
thanks
My Code:
<form method="post" action="pr_apv_dem.php">
<table border ="0" bordercolor=#000000 bgcolor="#FFFFFF" align-"center"i width=700>
<!--------------------------------------------------tr>
<td><input type="checkbox" onClick="Checkall(this.form);" />check all( Use this to select/deselect items in list)<br />
</td> <td> </td>
</tr---------------------------------------->
<tr >
<td valign=top NOWRAP><input type="checkbox" onClick="Checkall(this.form);" />check all( Use this to select/deselect items in list)<br /></td>
</tr>
<tr>
<td>
<!----table width=750 border=0----------->
<table id="classinfo" summary="Class Information" >
<tr>
<th> </th>
<th>Id </th>
<th>Title </th>
<th>Type </th>
<th>Status </th>
<th>Start Date </th>
<th>End Date </th>
<th>Publishing Date </th>
<th>Weight </th>
</tr>
<?
while ($row = mysql_fetch_array($result)) {
$RowColor=useColor();
echo "<tr > ";
echo "<td Valign=top NOWRAP BGCOLOR=> <input type=\"checkbox\" value=".$row["iid"].",".$row["type"].",".$row["status"].",".$row["startdate"].",".$row["enddate"].",".$row["pubdate"]." name=\"iid[]\"> </td>";
echo " <td VALIGN=top BGCOLOR=> ".$row["iid"]." </td> ";
echo " <td VALIGN=top NOWRAP BGCOLOR=> <a href =\"javascript:void window.open('http://www.accessintel.com', 'Template', 'toolbar=no, directories=no, location=no, status=yes, menubar=no, resizable=no, scrollbars=yes, width=600, height=500')\"> ".$row["title"]."</a> </td>";
echo " <td VALIGN=top BGCOLOR=> ".$row["type"]."</td>";
echo " <td VALIGN=top NOWRAP BGCOLOR=> ".$row["status"]."</td>";
echo " <td VALIGN=top NOWRAP BGCOLOR=> ".$row["startdate"]. " <input type=hidden name=\"startdate[]\" value=".$row["startdate"]."></td>";
echo " <td VALIGN=top NOWRAP BGCOLOR=> ".$row["enddate"]."</td>";
echo " <input type=hidden name=\"enddate[]\" value=".$row["enddate"]."></td>";
echo " <td VALIGN=top NOWRAP BGCOLOR=> ".$row["pubdate"]."</td>";
echo " <td VALIGN=top NOWRAP BGCOLOR=> <input type=text name=weight[] size=4 maxlength=4 value=".$row["weight"]."></td>";
echo "</tr>";
}
?>
</table>
</td> </tr>
<tr>
<td>
<input type="submit" name="Hold" value="On Hold" class="demo4" onmouseover="hov(this,'demo4 btnhov')" onmouseout="hov(this,'demo4')" />
</td>
</tr>
</table>
<br>
</form>