title: unset($_GET['someVariable']) not working
body: <p>My web page "mywebpage.php" is arrived at by way of a 'GET' from "someotherpage.php":</p>
  
  <pre><code> // In someotherpage.php -- go to mywebpage.php and display the form:
    window.location = "mywebpage.php?someVariable=" + theVariable;
  </code></pre>
  
  <p>I handle this in "mywebpage.php" as follows:</p>
  
  <pre><code> THIS IS THE 'GET' HANDLER for the form IN "mywebpage.php":
    if(isset($_GET['someVariable']))
    {
         // set up form variables to initial values, then display the form
    }
  </code></pre>
  
  <p>When the form is SUBMIT'd, I re-enter the same "mywebpage.php" to handle the POST of the form:</p>
  
  <pre><code>  THIS IS THE 'POST' HANDLER IN "mywebpage.php"
    // okay the form was submitted, handle that here...
    if(isset( $_POST['theformSubmitButton']))
    {
           // handle the form submit
    }
  </code></pre>
  
  <p>The problem is when the user submits the form, the GET handler is still called so the form gets re-initialized.</p>
  
  <p>The reason is, when the user POST's the form, the GET['someVariable'] is still there so the GET handler is re-entered, and then the POST handler code is processed, but by then the GET handler re-initialized the form which confuses the user since they just got done changing the form's values away from the initial settings.</p>
  
  <p>In other words, when the form is submitted, the POST array is being correctly filled, but the GET array hangs around for the ride with its old variables still there, including 'someVariable'</p>
  
  <p>So I added an 'unset' call in the GET handler:</p>
  
  <pre><code> this is the MODIFIED 'GET' HANDLER in "mywebpage.php"
    if(isset($_GET['someVariable']))
    {
         // set up form variables then display the form
  
         // now clear out the 'someVariable' in the GET array so that 
         // when the user POST's the form, we don't re-enter here
         unset($_GET['someVariable']));
    }
  </code></pre>
  
  <p>THIS FAILED TO WORK.  When the form is posted, I'm still seeing that the GET handler above is called.</p>
  
  <p>I need to make sure when the form is submitted, the GET handler is not re-called -- why doesn't the "unset()" code above work?</p>
  
  <p>EDIT:  Here is the form, not everything just the important parts (I left out a lot of inputs, several img tags, etc., nothing more):</p>
  
  <pre><code> &lt;form enctype="multipart/form-data" action="#" style="display: inline-block"
           method="post" name="myForm" id="myFormId"&gt;
  
    &lt;textarea name="InitialText" id="theText" rows="4" cols="68"
         style="border: none; border-style: none"&gt;&lt;/textarea&gt;
    &lt;br /&gt;
    &lt;label style="font-weight: bold; font-style: italic"&gt;For more info provide an email addres:&lt;/label&gt;
    &lt;input type="text" id="emailField" name="emailFieldName" value="you@gmail.com" /&gt;
    &lt;input type="submit" id="theformSubmitButton" name="theformSubmitButton" value="Post Now"&gt;
    &lt;/form&gt; 
  </code></pre>