Hello,
My question is this:
I have this 10 input texboxes made by a FOR Loop...
My question now is, how can I get their input values?
Here are my codes:
Given: Inside a table
for ($i=1;$i<=10;$i++) { ?>
<tr>
<td>
<input name="date_range" id="date_range" type="text" tabindex='1' size='11' maxlength='11' readonly value="" > <img src="images/calendar.png" alt="Date From" id="txtDateFromTrigger" align="absmiddle"></slot></td>
<script type="text/javascript">
Calendar.setup (
{
inputField : "date_range", // ID of the input field
ifFormat : "%Y-%m-%d", // the date format
button : "txtDateFromTrigger" // ID of the button
}
);
</script>
</td>
<td>
<select name="shift" style="width:142px" style="font-size:12px;">
<option>--</option>
<?
foreach ($rsDept as $idDept=>$dept){
//echo sprintf("<option value=\"%s\">%s</option>",$dept['fldDepartmentID'],$dept['fldDepartmentName']);
echo sprintf("<option value=\"%s\">%s</option>",$dept['shift_id'],$dept['shift_description']);
}
?>
</select>
</td>
<td align="center"><input type="text" name="txtIn" size="15"></input></td>
<td align="center"><input type="text" name="txtOut" size="15"></input></td>
<td align="center"><input type="text" name="txtReason" size="15"></input></td>
<?php
?>
</tr>
<? } ?>
Question:
1.) Say from these 10 textboxes, how can I get all of its input values in an array?
2.) Is array the best solution for this problem?
3.) How can I name my textboxes?
4.) How can I make an array from it?
Thank you very much and I hope someone can help me on this.
Grace