Hi,
I was wondering if someone could give me a hand, i have created an array for entering details into fields, and need some help pulling the information out of those boxes.
The code i have is as follows:
<form action="Now.php" method="post" name="form1" id="login" style="margin-top:0">
<?php
for($i = 0; $i < 20; $i++)
{
?>
<table width="100%" border="0" cellspacing="0" cellpadding="5" class="texts">
<tr>
<th width="10" scope="col">Round</th>
<th width="10" scope="col">Date</th>
<th width="10" scope="col">Time</th>
<th width="10" scope="col">Opposition</th>
<th width="10" scope="col">Bye</th>
<th width="10" scope="col">Venue</th>
<th width="10" scope="col">Field</th>
</tr>
<tr>
<td><input name="Round<?php echo $i; ?>" type="text" class="formsBackend" id="Round" size="2" maxlength="4"></td>
<td><input name="Date<?php echo $i; ?>" type="text" class="formsBackend" id="Date" size="8" value="dd/mm/yyyy" </td>
<td><input name="Time<?php echo $i; ?>" type="text" class="formsBackend" id="Time" size="4" value="h:mm" </td>
<td><input name="Opposition<?php echo $i; ?>" type="text" class="formsBackend" id="Opposition" size="20"></td>
<td><input name="bye<?php echo $i; ?>" type="checkbox" id="bye" value="BYE"></td>
<td><input name="Field<?php echo $i; ?>" type="text" class="formsBackend" id="Field" size="2"></td>
</tr>
</table>
<hr width="75%">
<?php } ?>
</form>
As you can see, the for statement changes the name of each field to suit how many times that it repeats.
What i need to be able to do is pull only the rows that have the "Round" value, for example, the loop goes for 20 times at the moment, and say the operator only adds 4 fields, then i only want those 4 rows so i can insert them into the database, and ditch the rest of the empty rows
Cheers