• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 14. Managing Content with Forms > Using Session Variables and Hidden Fie...

Using Session Variables and Hidden Fields to Track Users

One concern administrators have about a content management system is the potential for abuse. If someone manages to access the form that enables users to add a new Traveler's Journal for malicious purposes, you want to know who did it. Or, more specifically, you want to know whose account was used to do it. That way, you can identify the responsible employee (if it was an employee) or at least remove the account (if it was not). In this task, you'll capture the account used to access the admin pages, and save it with the accompanying journal_entry.

The technique you will use—and this is explained in more detail as you do it—is to capture the user's identification as it is stored in a session variable, and copy that value into the form using a hidden field. The contents of the hidden field will be submitted with the contents of the text area, and stored in the database.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint