Skip to main content
August 31, 2011
Answered

Passing username to a recordset with the login page

  • August 31, 2011
  • 1 reply
  • 681 views

Hi,

I am help develop a page for one of our classes at our school.  Is there a way that when you create a login form and authenticate to a new page that the username also get forwarded to a recordset so that it can be used to fill hidden fields of other forms on the new page?

This topic has been closed for replies.
Correct answer Lon_Winters

Yes. If you're using the built in DW login behavior, DW will place the user name in a session variable. Look carefully in the login code to see what this variable is called. If you're using ASP this session variable is called MM_Username. In PHP, there is a counterpart, but I can't recall at this time what it's called. If the page with the recordset is to only display data from that user, filter the recordset on the user name column using the Session variable parameter, and enter the name of the session variable in the text box.

1 reply

Lon_Winters
Lon_WintersCorrect answer
Inspiring
September 1, 2011

Yes. If you're using the built in DW login behavior, DW will place the user name in a session variable. Look carefully in the login code to see what this variable is called. If you're using ASP this session variable is called MM_Username. In PHP, there is a counterpart, but I can't recall at this time what it's called. If the page with the recordset is to only display data from that user, filter the recordset on the user name column using the Session variable parameter, and enter the name of the session variable in the text box.

September 1, 2011

Thanks, this worked exactly the way I need it to!


Lon_Winters
Inspiring
September 2, 2011

You're welcome. I'm glad you were able to decipher my instructions!