title: HTML Status 500 Apache error on submit
body: <p>I have a simple PHP file that creates buttons for each of my Diablo 3 characters. It utilizes the JSON data from this site, assigns the name of the hero to the button, and the id of the hero to the id field:</p>
  
  <p><a href="http://us.battle.net/api/d3/profile/raphattack-1736/" rel="nofollow">http://us.battle.net/api/d3/profile/raphattack-1736/</a></p>
  
  <p>What I then attempt to do in my code is to append <code>hero/</code> + <code>id</code> to the URL in order to navigate the user to the page for the specified hero on a button click. Here is the code:</p>
  
  <pre><code>&lt;?php   // json.php
      define("URL", "http://us.battle.net/api/d3/profile/raphattack-1736/");
      $data = json_decode(file_get_contents(URL));
  
      foreach ($data-&gt;heroes as $mydata) {
          $test = URL . "hero/" . $mydata-&gt;id;
          echo &lt;&lt;&lt;_END
  &lt;form method="post" action='$test'&gt;&lt;input type="submit" id='$mydata-&gt;name' value='$mydata-&gt;name'&gt;&lt;/form&gt;
  _END;
      }
  ?&gt;
  </code></pre>
  
  <p>This works correctly in that each button is created with the correct heroes and their corresponding names. Their ids are also associated with the buttons, and when clicked on, the user will be navigated to the correct url. The issue is that it will always result in an error: <code>HTTP Status 500 - The server encountered an internal error that prevented it from fulfilling this request.</code></p>
  
  <p>If I simply refresh the page, then it will display the JSON data for that hero, so the url is definitely correct. It just seems that upon first nagivating to the page after a button click, this error is always encountered.</p>
  
  <p>Example URL: <a href="http://us.battle.net/api/d3/profile/raphattack-1736/hero/4771127" rel="nofollow">http://us.battle.net/api/d3/profile/raphattack-1736/hero/4771127</a></p>