Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Numbers

Status
Not open for further replies.

schoch

Technical User
Jan 17, 2007
13
AU
I want to tally up the numbers inputted in each cell for the specific column e.g.
Code:
<input name="md1" type="text" id="md1" size="10" /> 
and 
<input name="md2" type="text" id="md1" size="10" />
=<input name="md_total" type="text" id="md_total" size="10" value="<?php
	   $md1=md1;
 $md2=md2;
 $md_total=($md1+$md2);

 echo $md_total;
 ?>"/>
How do I do it so it automatically adds without having to use a submit button??
 
Using PHP? You can't.

For what you want, you have to use a client-side scripting language, like JavaScript. Your question will, I am sure, get a ready answer in the JavaScript forum: forum216


Want the best answers? Ask the best questions! TANSTAAFL!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top