Your out of the realms of php an into javascript here. but what you could do is.. say you had a page that gave a list of products with the price and quantitys listed and when you change the quantity the total price updates. It would be like.
<HEAD>
<TITLE></TITLE>
<SCRIPT language="javascript">
function tot_up()
{
book_tot.value=1.50book_qty.value
}
function tot_up2()
{
book2_tot.value=3.75book2_qty.value
}
</SCRIPT>
</HEAD>
<BODY>
<CENTER>
<TABLE border=1 cellpadding=2 cellspacing=2>
<TR>
<TH>Product</TR>
<TH>Cost</TR>
<TH>Quantity</TH>
<TH>Total</TH>
</TR>
<TR>
<TD>A Book</TD>
<TD>1.50</TD>
<TD><INPUT type="text" size=3 name="book_qty" onchange="tot_up()"></TD>
<TD><INPUT type="text" size=4 name="book_tot" READONLY></TD>
</TR>
<TR>
<TD>Another Book</TD>
<TD>3.75</TD>
<TD>
<SELECT name="book2_qty" onchange="tot_up2()">
<OPTION value="0" SELECTED>0
<OPTION value="1">1
<OPTION value="2">2
<OPTION value="3">3
<OPTION value="4">4
<OPTION value="5">5
<OPTION value="6">6
<OPTION value="7">7
<OPTION value="8">8
<OPTION value="9">9
<OPTION value="10">10
</SELECT>
</TD>
<TD><INPUT type="text" size=4 name="book2_tot" READONLY></TD>
</TR>
</TABLE>
<P>
</CENTER>
</BODY>
A bit long winded. Someone may be able to come up with a more compact version but it works.
Mark.