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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Field Calculation

Status
Not open for further replies.

NullOp

Programmer
Jan 2, 2004
81
US
I want to calculate a value and display it in a form field. Its the classic "9 widgets @ 4.95 each = ?" problem. Obviously I am a PHP newbie. I haven't found an example on how to do this in PHP. The form the user is entering data into is already displayed when this calculation takes place. Any and all help is appreciated!

"Life Is Good!
 
So you want to calculate things after the form has loaded and before the form is being submitted? Then you need client-side scripting, not server-side, which PHP is. I suggest you venture over to forum216.
 
Ah Na! So it IS a javascript problem. Like I said, i'm a newbie. Thanks for the response!

"Life Is Good!
 
If the user is entering a data, can you not do the calculation after you submit the form? Or does it have to be immediately after the user keys in the values without refreshing the page?

----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top