} catch (PDOException $e) { print 'Connection failed: ' . $e->getMessage(); } ?> <body> <main> <h1>Hunting Style Edit</h1> <div> <h2>Add new creature hunting style</h2> <form method="post" action="CreatureHuntingStyleAdd.php"> <input type="text" name="Name"> <input type="submit" value="Create"> <input type="reset" value="Restart"> </form> </div> <div> <h2>List of creature hunting styles</h2> <ul> <?php $creatureHuntingStyleGateway = new CreatureHuntingStyleGateway($database); $attributes = $creatureHuntingStyleGateway->selectAll(); foreach ($attributes as $attribute) { print "<li>" . $attribute['name'] . "</li>"; } ?> </ul> </div> </main> </body> </html>