You have been doing a couple of things wrong here which has lead to the browser trying to guess what you are trying to do. I suggest you take a little time to learn the proper way to use HTML forms. I recommend http://www.amazon.com/Build-Your-Website-Right-Using/dp/0987090852 It was the first book I read on HTML and gives a good foundation on some concepts I think you are missing.
So how to get this to work?
Well first you need to define your input type, which should be text, as your input is just a few words or so.
<input name="key" type="text" />
Next your “maginifying glass button” should be a submit button.