Attached a Controller to the Register Form

I made a registration form for users to register. In my register-form.php, I wrote code that will create a post for the email, username, and password for the user.