Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP forms - 'get' working but 'post' not
    primarykey
    data
    text
    <p>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:</p> <blockquote> <p>Not Acceptable</p> <p>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.</p> </blockquote> <p>Here is my code on the form page:</p> <pre><code>&lt;form id="registration" onsubmit="return validateRegistration();" action="register.php" method="post"&gt; Name: &lt;input type="text" id="name" name="name" placeholder="Required"&gt; &lt;br&gt; Email: &lt;input type="email" id="email" name="email" placeholder="Required"&gt; &lt;br&gt; Confirm: &lt;input type="email" id="confirm_email" autocomplete="off" placeholder="Required"&gt; &lt;br&gt; Password: &lt;input type="password" id="password" name="password" placeholder="Required"&gt; &lt;br&gt; Confirm: &lt;input type="password" id="confirm_password" autocomplete="off" placeholder="Required"&gt; &lt;br&gt; City: &lt;input type="text" id="city" name="city" placeholder="Optional"&gt; &lt;br&gt; Country: &lt;input type="text" id="country" name="country" placeholder="Optional"&gt; &lt;br&gt; &lt;br&gt; &lt;hr&gt; &lt;a href="#"&gt;Terms and Conditions&lt;/a&gt; &lt;br&gt; &lt;input type="submit" value="Accept and Complete Registration"&gt; &lt;/form&gt; </code></pre> <p>And on my script page (register.php), I have:</p> <pre><code>&lt;?php echo "Name: " . $_POST["name"] . "&lt;br&gt;"; echo "Email: " . $_POST["email"] . "&lt;br&gt;"; echo "Password: " . $_POST["password"] . "&lt;br&gt;"; echo "Location: " . $_POST["city"] . ", " . $_POST["country"] . "&lt;br&gt;"; ?&gt; </code></pre> <p>If I just go to <code>register.php</code> it just shows blanks where the Posts are, but if I submit the form it gives the Not Acceptable 406 error.</p> <p>Can someone please help me with this? I'm totally boggled. Thanks</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload