<?php require "equation.php"; if (isset($_POST['submit'])) { $equation = new Equation($_POST['equation']); echo 'Infix: ' . $equation->getInfix(); echo '<br>Evaluation: ' . $equation->evaluate(); } ?> <html> <body> <form method="post"> <input type="text" name="equation"/> <button type="submit" name="submit" value="submit">Submit</button> </form> </body> </html>