By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,719 Members | 1,224 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,719 IT Pros & Developers. It's quick & easy.

Using PHP and Javasrcipt

P: n/a

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>


Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.