title: Flask request.form.get returning None
body: <p>I am new to flask and am trying to learn. I am trying to access information from the query string. Here is my html code (simplestuff.html, it is in the templates folder):</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;form&gt;
  &lt;select onchange="showUser(this.value)"&gt;
  &lt;option value="1"&gt;Get Something&lt;/option&gt;
  &lt;option value="2"&gt;Get Query String&lt;/option&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;p id="demo"&gt;&lt;/p&gt;
  &lt;ol id="new-projects"&gt;&lt;/ol&gt;
  
  &lt;script&gt;
  function showUser(str) {
     if (str=="2") {
        //Age in the query string.
        var age = 30;
  
        //redirecting to a page with the query string in the url.
        location.href = "simplestuff.html?age=" + age;
  
        //Using flask to access age in the query string.
        $( "#new-projects" ).load( "QueryStringInfo" );
      }
  }
  &lt;/script&gt; 
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is my flask code (main.py) that tries to access age in the query string:</p>
  
  <pre><code>from flask import Flask, render_template, request
  
  app = Flask(__name__, static_url_path='')
  
  @app.route('/simplestuff')
  def render_plot():
      return render_template('simplestuff.html')
  
  @app.route('/QueryStringInfo')
  def do_something():
      #Requesting the age variable in the query string.
      age = request.args.get('age')
      return age
  
  if __name__ == '__main__':
      app.run()
  </code></pre>
  
  <p>When I run the server and go to 127.0.0.1:5000/simplestuff the html page runs fine. Then when I select "Get Query String" the url changes as it is supposed to do and the query string appears. However, when QueryStringInfo is loaded a "None" is returned instead of the age. What am I doing wrong here?</p>
  
  <p>Edit: changed request.form.get('age') to request.args.get('age). Also changed print age to return age. QueryStringInfo is giving me a 500 error and no return (probably due to the 500 error). </p>