title: werkzeug.exceptions.BadRequestKeyError: 400 Bad Request: The browser (or proxy) sent a request that this server could not understand. KeyError: 'id'
body: <p>html page</p>
  
  <pre><code>{%block title%}Login page{% endblock %}
  
  {%block content%}
  &lt;form action = '#' method="post"&gt;
     &lt;p&gt;creds:&lt;/p&gt;
     &lt;p&gt;&lt;input type="number"  placeholder="id"  Id="id" /&gt;&lt;/p&gt;
     &lt;p&gt;&lt;input type="text"  placeholder="nm"  name="nm" /&gt;&lt;/p&gt;
     &lt;p&gt;&lt;input type="submit" value="submit" /&gt;&lt;/p&gt;
  &lt;/form&gt;
  {%endblock%}
  </code></pre>
  
  <p>app code</p>
  
  <pre><code>@app.route("/")
  def home():
      return render_template("login.html")
  
  @app.route("/",methods = ["POST","GET"])
  def post():
      if request.method == "POST":
          user = request.form['nm']
          id = request.form['id']
          sql = ('''INSERT INTO abc
                  (id, name) VALUES (?, ?)
                  ''')
          val = (id,user)
          cur.execute (sql, val)
      return 'Ok'
  </code></pre>
  
  <p>i tried using return.form.get('id') but its returning null</p>
  
  <p>Can anyone please help me on this</p>
  
  <p>Thanks</p>