title: Stack overflow solutions are not working for me what i'm I doing wrong?
body: <p>This question has been asked alot so I found this article <a href="https://stackoverflow.com/questions/2414660/allowing-users-to-refresh-browser-without-the-confirm-form-resubmission-pop-up">Allowing users to Refresh browser without the &quot;Confirm Form Resubmission&quot; pop-up</a></p>
  
  <p>And I follow what it said but now i'm getting this message 500: Internal Error.</p>
  
  <p>So what i'm I doing wrong here? I basically want be able to refresh a page with out getting greeted with this message </p>
  
  <p><em>Confirm For Resubmission
  The page that you're looking for used information that you entered. Returning to that page might cause any action you took to be repeated. Do you want to continue?</em></p>
  
  <p>because of a form and I all so checked this out to <a href="https://stackoverflow.com/questions/3923904/preventing-form-resubmission">Preventing form resubmission</a></p>
  
  <p>I try to understand these guys answers but i'm still not getting something right if any one can show me the two so called poplar methods mentioned in the links by using the PHP method or the AJAX with jQuery method to prevent that confirm for resubmission message I will really appreciate that. Please I prefer code solutions based on my code as answers because I personally learn best that way thank you. </p>
  
  <p><a href="https://i.stack.imgur.com/iI5zl.gif" rel="nofollow noreferrer">GIF Screenshot</a></p>
  
  <p><strong>code</strong></p>
  
  <p><em>index.php</em></p>
  
  <pre><code>    &lt;!DOCTYPE html&gt;
      &lt;html&gt;
        &lt;head&gt;
          &lt;style&gt;
            *, *:before, *:after {
        -moz-box-sizing: border-box;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
      }
  
      body {
        font-family: 'Nunito', sans-serif;
        color: #384047;
      }
  
      form {
        max-width: 300px;
        margin: 10px auto;
        padding: 10px 20px;
        background: gold;
        border-radius: 8px;
      }
  
      h1 {
        margin: 0 0 30px 0;
        text-align: center;
      }
  
      input[type="text"] {
        background: rgba(255,255,255,0.1);
        border: none;
        font-size: 16px;
        height: auto;
        margin: 0;
        outline: 0;
        padding: 15px;
        width: 100%;
        background-color: white;
        color: black;
        box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
        margin-bottom: 30px;
      }
  
  
      button {
        padding: 19px 39px 18px 39px;
        color: #FFF;
        background-color: blue;
        font-size: 18px;
        text-align: center;
        font-style: normal;
        border-radius: 5px;
        width: 100%;
        border: 1px solid blue;
        border-width: 1px 1px 3px;
        box-shadow: 0 -1px 0 rgba(255,255,255,0.1) inset;
        margin-bottom: 10px;
        cursor: pointer;
      }
  
      label {
        display: block;
        margin-bottom: 8px;
      }
  
      label.light {
        font-weight: 300;
        display: inline;
      }
  
  &lt;/style&gt;
        &lt;/head&gt;
        &lt;body&gt;
      &lt;form action='x.php' method='POST'&gt;
        &lt;h1&gt;Form&lt;/h1&gt;
        &lt;label for='name'&gt;Name&lt;/label&gt;
        &lt;input type='text' id='name' name='name' value='Tom'&gt;
        &lt;label for='age'&gt;Age&lt;/label&gt;
        &lt;input type='text' id='age' name='age' value='20'&gt;
        &lt;button type='submit'&gt;Send&lt;/button&gt;
      &lt;/form&gt;
        &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p><em>x.php</em></p>
  
  <pre><code>&lt;?php
  
  if($_SERVER['REQUEST_METHOD'] == "POST"){ header('x.php'); }
  
  $name = $_POST['name'];
  $age = $_POST['age'];
  
  ?&gt;
  
  &lt;p&gt;&lt;?php echo $name; ?&gt;&lt;/p&gt;
  &lt;p&gt;&lt;?php echo $age; ?&gt;&lt;/p&gt;
  </code></pre>