This topic is locked

Insert Delta of two fields into database

9/9/2005 9:54:19 AM
PHPRunner General questions
K
kellyho67 author

I know I asked this before but I didn't get a response so I'm guessing I didn't ask it right.
If I have an add page that takes
Time-In

Time-Out
Lets say time-in is 12:00 and time out is 1:00 the delta is 1 hour. Rather than create an edit box on the add page for the delta for the user to put it in I'd like to make this a hidden field where the user never sees it but when they submit the add it updates a detla field in the database along with all the other fields in the form.
Not sure where to put that. I have done an onblur event handler in the control builder area to use a js to calc the deltas but it needs to be in input box instead of hidden as it seems.

Sergey Kornilov admin 9/11/2005

I guess the easiest way to implement this is to use server-side calculation in PHP code right before data is inserted into the database.