moved common tests into separate file so they are run
form can redirect to next page after successful post