ezeddie
07-31-2007, 08:37 PM
not sure if i should use html, php, asp, ajax or a combination or whatnot for what i'm trying to do....
im basically making an order form from scratch where in each row i will select the quantity from 1-10, select from a list of items, have a text field show the value from the item select x quantity, have the next text field for if i want to apply a discount, and have a final text field calculate the total for the row.
i ultimately want to send the values for each field to a php script so i can print the order.....any help would be greatly appreciated. i'm showing a sample form i'm planning on.
example:
row1:
select quantity 1
select service 1 that is $200
next field displays $200 (1x200)
next field i adjust price -$10
row total displays $190
row2:
same as row1
service total then displays $380 (190+190)
<form action="??????????" method="post" enctype="multipart/form-data" name="calc" id="calc">
<table width="74%" height="252" border="0" align="left" id="services">
<tr>
<td height="45" colspan="5" bgcolor="#33CC33">Services</td>
</tr>
<tr>
<td width="17%">Quantity</td>
<td width="25%">Service</td>
<td width="22%">Price</td>
<td width="10%">Adjust</td>
<td width="26%">Total</td>
</tr>
<tr>
<td><select name="quan1" id="quan1">
<option selected="selected"> </option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select> </td>
<td><select name="service1" id="service1" >
<option selected="selected"> </option>
<option value="200">Service1</option>
<option value="100">Service2</option>
<option value="50">Service3</option>
</select> </td>
<td><input type="text" name="price1" id="price1" /></td>
<td><input type="text" name="adjust1" id="adjust1" /></td>
<td><input type="text" name="total1" size="20" id="total1" /></td>
</tr>
<tr>
<td><select name="quan2" id="quan2">
<option selected="selected"> </option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select> </td>
<td><select name="service2" id="service2">
<option selected="selected"> </option>
<option value="200">Service1</option>
<option value="100">Service2</option>
<option value="50">Service3</option>
</select> </td>
<td><input type="text" name="price2" id="price2" /></td>
<td><input type="text" name="adjust2" id="adjust2" /></td>
<td><input type="text" name="total2" size="20" id="total2" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><input type="text" name="servicetotal" id="servicetotal" /></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>
<input type="submit" value="Calculate">
<input name="Reset" type="reset" value="Reset Form" />
</p>
</form>
im basically making an order form from scratch where in each row i will select the quantity from 1-10, select from a list of items, have a text field show the value from the item select x quantity, have the next text field for if i want to apply a discount, and have a final text field calculate the total for the row.
i ultimately want to send the values for each field to a php script so i can print the order.....any help would be greatly appreciated. i'm showing a sample form i'm planning on.
example:
row1:
select quantity 1
select service 1 that is $200
next field displays $200 (1x200)
next field i adjust price -$10
row total displays $190
row2:
same as row1
service total then displays $380 (190+190)
<form action="??????????" method="post" enctype="multipart/form-data" name="calc" id="calc">
<table width="74%" height="252" border="0" align="left" id="services">
<tr>
<td height="45" colspan="5" bgcolor="#33CC33">Services</td>
</tr>
<tr>
<td width="17%">Quantity</td>
<td width="25%">Service</td>
<td width="22%">Price</td>
<td width="10%">Adjust</td>
<td width="26%">Total</td>
</tr>
<tr>
<td><select name="quan1" id="quan1">
<option selected="selected"> </option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select> </td>
<td><select name="service1" id="service1" >
<option selected="selected"> </option>
<option value="200">Service1</option>
<option value="100">Service2</option>
<option value="50">Service3</option>
</select> </td>
<td><input type="text" name="price1" id="price1" /></td>
<td><input type="text" name="adjust1" id="adjust1" /></td>
<td><input type="text" name="total1" size="20" id="total1" /></td>
</tr>
<tr>
<td><select name="quan2" id="quan2">
<option selected="selected"> </option>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
</select> </td>
<td><select name="service2" id="service2">
<option selected="selected"> </option>
<option value="200">Service1</option>
<option value="100">Service2</option>
<option value="50">Service3</option>
</select> </td>
<td><input type="text" name="price2" id="price2" /></td>
<td><input type="text" name="adjust2" id="adjust2" /></td>
<td><input type="text" name="total2" size="20" id="total2" /></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
<td> </td>
<td><input type="text" name="servicetotal" id="servicetotal" /></td>
</tr>
</table>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<p>
<input type="submit" value="Calculate">
<input name="Reset" type="reset" value="Reset Form" />
</p>
</form>