sagedemage / steam_game_review

A website to review Steam games you own and games recommended to you.
MIT License
0 stars 0 forks source link

Cookie Session #15

Closed sagedemage closed 1 year ago

sagedemage commented 1 year ago

Cookie Session

Create a cookie session system to persist authentication for a user.

Tasks

kenzit100 commented 1 year ago

With the provided code modifications, I have implemented sessions for user authentication, and users can log in, maintain their session, and log out. Cookies are also managed automatically as part of the session mechanism.

Implemented session management to authenticate and remember logged-in users.

Created a logout.php file to handle the logout process and redirect users to the login page

Linked the "Logout" button in the logout.html page to the logout.php file which when the user clicks, it takes them to the login page

Stored user-specific information in the session for a personalized user experience. I added the setcookie function to create a session cookie named "user_id" that will expire after 1 hour(3600 seconds). The session cookie will be set when the user logs in successfully.

kenzit100 commented 1 year ago

Updating the logout page

kenzit100 commented 1 year ago

Updated Logout page

kenzit100 commented 1 year ago

Adding more pages to the nav bar

kenzit100 commented 1 year ago

I added the setcookie function to create a session cookie named "user_id" that will expire after 1 hour(3600 seconds). The session cookie will be set when the user logs in successfully.

kenzit100 commented 1 year ago

After a successful registration, it redirects the user to the login page

After the user logs in, it redirects to the dashboard