I make a PHP script for calculation based on pricelist. My script work powerful, but the problem is: I must enter the value directly in source code. I wouldlike to offer end-user the opportunity to use my script without any code by a simply fill html form.
I have difficulty to link my php script on the form to make this calculation.
Bellow my source code:
-
FORM
<center> <form action="samepage.php" method="post"> <input type="text" name="amount" value="0"/>F <input name="button" type="submit" id="button" value="CALCULATE" /> </form> <br>
-
PHP SCRIPT
Corresponding your Amount, YOU MUST PAY:
// How to remplace 500 value with form value?// THE PRICELIST PHP SCRIPT
<?php if($montant <= 5000){ // If the amount are <= to 500, 200 must add echo $montant + 200; F </h2> </center>
I need your help, Thanks in advance!
I have difficulty to link my php script on the form to make this calculation.