Ok, so create a html form.
<form action='calc.php' method='POST'>
<select name='chemical'>
<!--
<option value='2'>DV</option>
<option value='1'>BHS</option>
<option value='3.67'>STC</option>
<option value='1'>DVCPRO</option>
</select>
<input type=text name='qty' value=''>
<input type=sumbit name='submit' value='Submit'>
</form>
I'lll let you do the formatting.
next you need to create the script to process it. This is where it gets tricky. I didnt undestand what you meant when you said this:
Quote:
DV (2.00) 1
BHS (1.00) 1
STC (3.67)
DVCPRO (1.00) 2
|
I have sort of guessed that the first numbers where the number to be multiplied with the quantity. so here goes with that assumption. Make a file called calc.php, here's what goes inside it:
Quote:
<?
$qty = $_POST[qty];
$chemical = $_POST[chemical];
$total = $qty * $chemical;
?>
<html>
<some decrative junk goes here>
Your total is <? echo $total; ?>
</html>
|
done!