I'm having an issue getting my php script to process and display the data I input into my form.
signup.html
<h4>Create Account</h4>
<form action="process.php" method="POST">
<div>
<label for="name">Name</label>
<input type="text" id="name" name="name">
</div>
<label for="username">Username</label>
<input type="username" id="username" name="username">
</div>
<div>
<label for="password">Password</label>
<input type="password" id="password" name="password">
</div>
<div>
<label for="passwordconfirm">Repeat Password</label>
<input type="password" id="passwordconfirm"
name="password_confirmation">
</div>
<button>Sign Up!</button>
</form>
</body>
<script type="module" src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.esm.js"></script>
<script nomodule src="https://unpkg.com/ionicons@5.5.2/dist/ionicons/ionicons.js"></script>
<script src="main.js"></script>
</html>
On my PHP script I just want to return the data I type into the inputs, just to show it's working by via -
<?php
print_r($_POST);
However when doing so, nothing is returned that I've typed into the form. Instead it displays the PHP class itself.
This is the first time I've ever used PHP so this may be something simple.