Hello all experts.
I am presently custom coding a form in a PHP website. It has a multi page form. In few fields on the form user has to enter data. Based on data entered some fields calculate and populate automatically. I have included the calculation in PHP code and come across one challenge.
For one particular filed the calculation is
If x-y >0 then echo x-y =z else y
X is a value in a field entered by the user
Y is a value taken from DB
My issue is how do I take one value from the filed of the form and other from DB in the same calculation, show the result in desired filed of the same form and then later save the result filed vale in a session variable?
<input type="text" name="countable_equity" id="countable_equity" readonly="readonly" size="30" class="required number" value="<?php if(!$_SESSION['married']&&$_SESSION['single']['dependent_spouse']!="yes")