I know the php is basic and not completed yet, but I am working on that. My next step I want the result to show on index.php when a form is submitted to calculator2.php. I just cant seem to get it. Please help!
index.php
<div class="post">
<h2 class="title">Calculator</h2>
<hr />
<form method="post" action="calculator2.php">
Fireplace Front Width: <input type="text" name="fw">
<br />
Fireplace Back Width: <input type="text" name="bw">
<br />
Fireplace Depth: <input type="text" name="fd">
<br />
<input type="submit" name="Submit" value="Submit">
</form>
Pounds Of Glass Needed: <?php echo $res1; ?>
</div>
calculator2.php
<?php
$frontwidth = $_POST['fw'];
$backwidth = $_POST['bw'];
$firedepth = $_POST['fd'];
$x = $frontwidth + $backwidth+ $firedepth;
$y = ($x / 3) * .6667;
$res1 = $y *2;
echo $res1;
?>