i have a section of a form where you enter vehicle expenses for a taxi shift, the way it is set up at the moment is so that there are 20 values in a vehicle expenses array so that you can enter up to 20 different expenses. Is there a way that i can have it so that it only shows one of the 20 arrays and when value1 is filled in it adds a new row below to enter value2 etc...?
each row contains the expense type, expense quantity and expense value. I want it to add a new row when the expense value is greater than 0.
thanks
shaun
PHP Code:
<tr bordercolor="#000000">
<td height="26"><div align="center"><strong><font color="#000000">
<select name="P_ExpenseID1" tabindex="24" onBlur="mark_delete()">
<option></option>
<?php
while ($exprow = mysql_fetch_object ($squery_result))
{ ?>
<option value="<?php print $exprow->ExpenseId ; ?>"><?php print $exprow->ExpenseType; ?></option>
<?php
}
?>
</select>
</font></strong> <strong>
</strong></div></td>
<td width="29%"><div align="center"><strong>
<input type="text" name="ExpQty1" tabindex="25">
</strong></div></td>
<td width="30%">
<div align="center"><strong>
<input type="text" name="ExpValue1" onBlur="totalexp()" onchange="expenseID1()" tabindex="26" value="<?php print $_POST['ExpValue1'];?>">
</strong></div></td>
</tr>
thanks
shaun
Comment