Validating and processing forms with javascript and php