Using PHP and Javasrcipt

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!


I've been asked by a client to design what is essentially a very large
order form which draw it's products from a MySQL db using PHP and then
writes them to a table, this i'm fine with.

However, the form must add up quantities and work out discounts based
on the base price and quantity, again, i'm ok with this in either
Javascript or PHP.

However, as this information is dynamically sourced and all of the
different fields need naming, i'm a little lossed as to how i can best
do this.

Does anyone have any suggesstions?

Client Side Code is included below: -

<html xmlns=" ">
<script language="JavaScript">
function Total( evt )
total.innerText = parseInt(document.orderform.amount1.value) *

<form name="orderform" id="orderform">
<table align="center" border="1" width="770px" cellspacing="0"
cellpadding="0" bordercolor="#000000">
<td>Product Code</td>
<td>Product Description</td>
<td>Product One</td>
<td><input type="hidden" name="amount1" value="15.4" />
<input type="text" name="amount2" onKeyUp="Total( event )" size="1"
<td><span id="total"></span>


Site Timeline