Hi all of you I have this application am making and its suppesd to make claims of refund, part of the script is here

But I cannot save this data into all the database
/*****************************************************************************************************************************/
function getValues(val){

var numVal1=parseInt(document.getElementById("milleage_start").value);
var numVal2=parseInt(document.getElementById("milleage_finish").value);
var numVal3=parseInt(document.getElementById("amount").value);

var rate = 35.00;

var totalValue = numVal1 - numVal2;

var totalAmount = totalValue * rate;

document.getElementById("milleage").value = totalValue;

document.getElementById("amount").value = totalAmount;
}

/*****************************************************************************************************************************/


<td><div align="right">Finish</div></td>
                <td><input type="text" name="textfield9" id="milleage_start" class="required" onkeyup="getValues(1)"/></td>
              </tr>
              <tr>
                <td><div align="right">Start </div></td>
                <td><input type="text" name="textfield10" id="milleage_finish" class="required" onkeyup="getValues(2)" /></td>
              </tr>
              <tr>
                <td td bgcolor="#E0E0E0"><div align="left"><strong>Total Milleage (KM) </strong></div></td>
                <td td bgcolor="#E0E0E0"><strong>
                  <input type="text"  name="milleage" id="milleage"  onkeyup="getValues(3)" class="required" values=""/>
                  <input type="hidden" name="milleage" id="milleage" />
                </strong></td>
              </tr>
              <tr>
                <td><div align="right">Amount in KShs </div></td>
                <td><strong>
                  <input type="text" name="amount" id="amount"  class="required" values="" />
                  <input type="hidden" name="amount" id="amount" />
                  (Rate
                  @ Kshs 35)</strong></td>

Any idea and help will be most appreceated