Server-Side Scripting/Cookies and Sessions

From Wikiversity
Jump to navigation Jump to search

This lesson introduces cookie and session processing.

Objectives and Skills[edit | edit source]

Objectives and skills for this lesson include:

Readings[edit | edit source]

  1. Wikipedia: HTTP cookie

Multimedia[edit | edit source]

Additional items will be contributed by course participants

Examples[edit | edit source]

Activities[edit | edit source]

Complete the following activities using HTML, CSS, and a server-side scripting language. Apply best practices for user interface design and your selected scripting language, including modules, comments, indentations, naming conventions, and constants. Use HTML forms and input elements for input, server-side scripts for processing, and HTML elements for output. Use separate functions for each type of processing. Avoid global variables by passing parameters and returning results. Add comments at the top of the code modules and include references to any resources used. Add the completed code to your website as /lesson12.

  1. Add a login screen to one of your database applications. Use bcrypt encryption for passwords and save encrypted passwords in the database. Use cookies to remember users and sessions to track authenticated users. Provide a way for new users to register their username and password.
  2. Provide a mechanism for users to request a password reset link sent to their email address. To avoid abuse of password resets by third parties, do not reset a user's actual password. The reset link should take the user to an authenticated screen that allows them to change the current password themselves.

Lesson Summary[edit | edit source]

Additional items will be contributed by course participants

Key Terms[edit | edit source]

Additional items will be contributed by course participants

See Also[edit | edit source]

References[edit | edit source]