I have currently created a form with two different buttons and i would like both buttons to do a different function, the first button is the Pay on Finance button and when that is pressed i would like it to divide the value the user entered into the text box by 12 and then echo "Your monthly payment will be result". and then for the second button which is Pay Full Amount it would multiply the value by 0.2 and then echo "please pay the deposit of result and pay the rest next week"
I have attempted this myself but don't fully understand what to do to get this working, i have read up a little on functions within php but i am a beginner and not too sure what i am doing with it, any help would be most appreciated.
Here is the code of the form I currently have.
<div id="form">
<form action="nissan350z.php" method="post">
<center> <input type="text" name="percent" id="percent" />
<input type="Submit" value="Pay on Finance">
<input type="Submit" Value="Pay Full Amount"> </center>
</form>