The user enters the login/register page. The user can then choose to register (for new users), or log in (for existing users). If the user chooses to register, their info (name, password, user type, email, etc...) is submitted through a form and sent to the database for user creation. If the user is succesfully created, the user is logged in and redirected to the home page. If the user already has an account, they will input their login credentials through a form, and the data will be sent to the database for authentication. If the user with the given credentials exists, the user is logged in an redirected to the home page.
The user enters the login/register page. The user can then choose to register (for new users), or log in (for existing users). If the user chooses to register, their info (name, password, user type, email, etc...) is submitted through a form and sent to the database for user creation. If the user is succesfully created, the user is logged in and redirected to the home page. If the user already has an account, they will input their login credentials through a form, and the data will be sent to the database for authentication. If the user with the given credentials exists, the user is logged in an redirected to the home page.