Hi, I have a PHP calculator that I wish to include, this is the code
How do I set up Chronoforms so that on pressing submit the form is refreshed with the calculation rather than returning to the index page - which is what happens if I simply place the code in the PHP form area,
many thanks
Mike
<a name="bmi"></a><table border=1 width=200><tr><td><center><b>Metric Formula</b></center><table><tr><td valign="middle">
<form method=POST action=<?php echo $_SERVER["PHP_SELF"] ."#bmi" ?>>
</td><td> Weight in Kilograms: <input size=3 name="Y" type="text"><br><br>
Height in Centimeters: <input size=2 name="X" type="text"><br>
<?
if(floatval($_POST['X']) != 0)
{
echo "<br> BMI = ";
echo round(($_POST['Y']) / (($_POST['X']) * ($_POST['X']))* 10000, 2);
}
if (!isset($_POST['X']) && !isset($_POST['Y']))
{
}
?><br><center><input name="metric" value=Calculate type="submit"></center></form>
</td></tr></td></tr></table></table></center>
How do I set up Chronoforms so that on pressing submit the form is refreshed with the calculation rather than returning to the index page - which is what happens if I simply place the code in the PHP form area,
many thanks
Mike