Define two event-handler functions
Add POST request to send form data to the server