title: PHP Multiple GET methods in one your
body: <p>I'm making a tool to pull eve API data and I use a GET form to take the data and get access to the <code>key ID</code> and <code>code</code> to access the data. This then pulls the first character ID on the key and grabs all that character data.</p>
  
  <p>for example the url is:</p>
  
  <pre><code>whatever.com/APIChecker/?keyID=123456&amp;code=ABCDEFGHIJKL
  </code></pre>
  
  <p>I pull these variables out via the session variables that they create. </p>
  
  <p>What I'm now trying to do is now have a for loop which puts up buttons for each character on the key so you can flick between characters, I'm trying and have tried get and post methods hidden in the button but can't seem to get my desired result. It seems to not be taking out the variable that i'm trying to pass and adding it into the $_SESSION array or the $_POST or the $_GET - i've tried print_r on all these variables but I can't get any output.</p>
  
  <p>Here is my primary form thats on my main page:</p>
  
  <pre><code>&lt;form method="get" action="APIChecker/" &gt;
    &lt;legend&gt; Submit an API Key&lt;/legend&gt;
  
    &lt;div class="control-group"&gt;
      &lt;label class="control-label"&gt;Key ID:&lt;/label&gt;
      &lt;div class="controls"&gt;
        &lt;input type="text"
        class="input-small"
        name="keyID""/&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="control-group"&gt;
      &lt;label class="control-label"&gt;Verification Code:&lt;/label&gt;
      &lt;div class="controls"&gt;
        &lt;input type="text"
        class="input-xxlarge"
        name="vCode"
        /&gt;
        &lt;p class="help-block"&gt;&lt;/p&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="control-group"&gt;
      &lt;div class="controls"&gt;
        &lt;button type="submit" class="btn"&gt;Submit API&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  </code></pre>
  
  <p>What I'm trying to do now is get another session variable from another page - which updates a variable and refreshes the page with the <code>keyID</code> and <code>code</code> unaltered.</p>
  
  <p>As in:</p>
  
  <pre><code>whatever.com/APIChecker/?keyID=123456&amp;code=ABCDEFGHIJKL **&amp;charID=654321**
  </code></pre>
  
  <p>so <code>$_SESSION['keyID'] = 123456</code></p>
  
  <p>&amp;  <code>$_SESSION['code'] = ABCDEFGHIJKL</code></p>
  
  <p>&amp;  <code>$_SESSION['charID'] = 654321</code></p>
  
  <p>what I've tried is:</p>
  
  <pre><code>&lt;form method="get" action="" &gt;
    &lt;div class="control-group"&gt;
      &lt;div class="controls"&gt;
        &lt;button type="submit" class="btn"&gt;
        &lt;input type="hidden"
        name="charID"
        value="$charID"
        /&gt;
        &lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
    &lt;div class="control-group"&gt;
      &lt;div class="controls"&gt;
        &lt;button type="submit" class="btn"&gt;Submit API&lt;/button&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  
  &lt;/form&gt;
  </code></pre>