Sessions from Login

October 26, 2003 by Carl Grint

You can add Session variables in the Login page, just some hand coding and altering of the Dreamweaver login script.

Locate this part of the script

' *** Validate request to log in to this site.
MM_LoginAction = Request.ServerVariables("URL")
If Request.QueryString<>"" Then MM_LoginAction = MM_LoginAction + "?" + Request.QueryString
MM_valUsername=CStr(Request.Form("UserName"))<-- create your varible in the same way
i.e mm_yourvarible="CStr"(Request.Form("yourfield"))

then

  If Not MM_rsUser.EOF Or Not MM_rsUser.BOF Then
    ' username and password match - this is a valid user
    Session("MM_Username") = MM_valUsername <-- add your session name from your varible as above
i.e Session("yourname") = MM_yourvarible

Hope this helps.