PHP coding question on a form?

jeena1

Guppy
Hello,

I am working on a form that includes formulas applied to certain cells. The problem is that I need to constrain the results to whole numbers and not have it go out decimal positions. How can I do this?

________________
 
Best would be to restrict the input on the client side. I mean, you could round up/down or use the floor/ceil functions in PHP after the data is submitted. But instead, using something like a jQuery forms plug in, you could do that on the client side--this would give instant feedback to the user, as well as give him/her the opportunity to enter a different number if appropriate.

Tim
 
Back
Top