input validation using php and javascript