updated php to seperate form and form handling