I have a page for people to submit their information /collect.php
but when submitting it keeps going to the root. Is it possible to submit the form and make it go to the same collect?
Here is the code I have so far:
<?php if (!empty($_POST)):
$firstname = htmlentities($_POST['firstname']);
$lastname = htmlentities($_POST['lastname']);
$email = htmlentities($_POST['email']);
$phone = htmlentities($_POST['phone']);
echo $firstname."<br/>";
echo $lastname."<br/>";
echo $email."<br/>";
echo $phone."<br/>";
else: ?>
<form action="." method="post">
<input type="text" name="firstname" placeholder="First name"><br/>
<input type="text" name="lastname" placeholder="Last name"><br/>
<input type="email" name="eamil" placeholder="Email address"><br/>
<input type="phone" name="number" placeholder="Phone number"><br/>
<input type="submit">
</form>
<?php endif; ?>