added PHP form validation and OOP