I have three variables. Two are server side from a database:
$base_duration = $arr['adzone_buyandsell_duration']
and
$base_price = $price['price']
both are int. The third will be user input: <input type="text" name="duration" value=""> I need to preform a calculation like such: $cal_price = $base_duration / $base_price * user_input I then need to be able to pass $cal_price back to be able to charge the user the correct price. I'm fairly familiar with php, but don't know how to perform this calculation in real time not when the form is submitted.
0 comments:
Post a Comment