I have a simple registration form. I've been searching for hours and tried everything - basically I've stripped it down to post/get. When I set the method to get (on both the form and script page) it works fine, when I set it to post, I get this error:
Not Acceptable
An appropriate representation of the requested resource /tmp/register.php could not be found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Here is my code on the form page:
<form id="registration" onsubmit="return validateRegistration();" action="register.php" method="post">
Name: <input type="text" id="name" name="name" placeholder="Required">
<br>
Email: <input type="email" id="email" name="email" placeholder="Required">
<br>
Confirm: <input type="email" id="confirm_email" autocomplete="off" placeholder="Required">
<br>
Password: <input type="password" id="password" name="password" placeholder="Required">
<br>
Confirm: <input type="password" id="confirm_password" autocomplete="off" placeholder="Required">
<br>
City: <input type="text" id="city" name="city" placeholder="Optional">
<br>
Country: <input type="text" id="country" name="country" placeholder="Optional">
<br>
<br>
<hr>
<a href="#">Terms and Conditions</a>
<br>
<input type="submit" value="Accept and Complete Registration">
</form>
And on my script page (register.php), I have:
<?php
echo "Name: " . $_POST["name"] . "<br>";
echo "Email: " . $_POST["email"] . "<br>";
echo "Password: " . $_POST["password"] . "<br>";
echo "Location: " . $_POST["city"] . ", " . $_POST["country"] . "<br>";
?>
If I just go to register.php
it just shows blanks where the Posts are, but if I submit the form it gives the Not Acceptable 406 error.
Can someone please help me with this? I'm totally boggled. Thanks