move form-submission script into external file to prevent re-submission of the form on page reload