Changed the type of the button to submit to pass info to server