I did a simple calculator where the user inputs a value and they hit summit and gives them the result.
/* Calculator For Competition Arena with high traffic.*/
$width = htmlentities($_POST['width']);
$length = htmlentities($_POST['length']);
$total = $squarefoot*.75;
$totalprice = $total *.82;
This is what I got, so far I been able to reload the page (after getting inputs and clicking submit) and take the user to the div where the calculator is. Is annoying that every time the hit summit the pages reloads. How can I make it so it just gives the result?
<h2>Calculate the price for your Arena</h2>
<form action="calculator.php#section2" method="post" >
<div id="width" style="float: left; margin-right: 14px;">
Enter width in feet: <input type = "text" name="width"><br>