php advanced - Form with some restriction and security in PHP