Homework 12: Cookies and PHP Sessions
- Due Oct 25, 2022 by 9:30am
- Points 1
- Submitting a website url
- Available after Oct 20, 2022 at 10:45am
Watch these videos:
- Cookies and session cookies (YouTube Links to an external site.)
- Cookies and sessions in in PHP (YouTube Links to an external site.)
Update the class code to include signin and signout API actions and handlers. The signin handler should expect a username and password, call the authenticate
function, and if successful, store a "signed in" flag in the PHP session indicating the user is signed in. The signout action should delete the signed in flag. Every other API action handler should require that the user be signed in according to the PHP session, but only the signin action should require the user's credentials (username and password.
Remember, to get credit for the homework, you don't have to have solutions that are 100% complete and working; I want to see that you made an effort to get them working so you can ask informed questions in class and so that when we go over and extend the homework in class, you have some working context for what we're doing.
Commit your two PHP files in a folder homework/hw12/
in your CSC302 git repo and push to GitHub. Submit a link to your the hw12 folder on GitHub to this Canvas assignment.