Hello all and thanks in advance for the help,
I am struggling to understand why the PHP code I have is not looping through each input field and posting/getting the output.
<html>
<body>
<!-- This PHP code will loop through all of the input fields and output the IDs and names. Both options of the get and post methods are checked. -->
<?php
foreach ($_POST as $key => $value) {
echo $key . ": " . $value . "<br/>";
}
foreach ($_GET as $key => $value) {
echo $key . ": " . $value . "<br/>";
}
?>
</body>
</html>
This is the form I am trying to get to work
<form class="form" action="response_page.php" method="post">
<div class="form__group">
<input type="text" placeholder="Username" class="form__input" required>
</div>
<div class="form__group">
<input type="email" placeholder="Email" class="form__input" required>
</div>
<div class="form__group">
<input type="password" placeholder="Password" class="form__input" required>
</div>
<input type="submit" name="submit" value="Submit" class="btn">
</form>