title: Python mechanize - submit form response
body: <p>I have this code:</p>
  
  <pre><code>import mechanize
  def register():
              br = mechanize.Browser()
              br.set_handle_robots(False)
              br.open("http://somtehing.com/form2/index.php")
              br.select_form(nr=0)
              br.form["email"] = "stone@klikni.com"
              br.form["name"] = "Jan"
              br.form["nickname"] = "Vrsrly"
              br.form["postnum"] = "41182"
              br.form["age"] = "52"
              br.form["sex"] = ["man"]
              br.form["tel"] = "+420723545054"
              br.find_control("rules").items[0].selected = True
              res = br.submit()
              content = res.read()
              with open("mechanize_results.html", "w") as f:
                  f.write(content)
  </code></pre>
  
  <p>but when i look on the mechanize_results.html website, it is just a filled form, checkbox checked, but i do not know if it was sent. When I did it manually, it redirected me to a page where "Registered successfully" was written. And I am not getting this response with mechanize. Any ideas how to solve it?</p>