Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to display users name when user is logged in 2

Status
Not open for further replies.

Jeremy74

IS-IT--Management
Nov 21, 2001
56
0
0
GB
I have a site where users join up using an input form. Once the user has registered successfully they are then directed to a login page. If the user logs in successfully I want their username displayed throughout the website. I have created restricted access pages and a logout button to end the session variable. How do I display the username throughout the site?

Cheers again

Jeremy
 
I just recently did this. Look in your login page code. You should see a session variable defined there for the user login. In my case it was called MM_Username. I then went to the page I wanted the named displayed on and set up a record set. This record set would be the table where the user information is stored.
Now set filter as follows
in the first drop down pick the field that IDs your user
in the next drop down to the right select =
in the next drop down select session variable
now in the last field type in what ever the session variable is named. Might be MM_Username if you used the DW login behavior.
Now you can set up your dynamic fields on your page and they should display your users information

Brian
 
Bingo
[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
[noevil]
 
Jeremy74, I've given Brian a
star.gif
on your behalf for his helpful post. Hope u don't mind...
[tt]"A Successful man is one who can build a firm foundation with the bricks that others throw at him"[/tt]
[noevil]
 
okay I have just worked out how to do it.

Cheers

Jeremy
 
Hi I hope somebody can help me Iam reasonably new to Dreamweaver.
I use a web interface to connect to a Sql database.
Iam trying to log details whenever anybody changes any information in the fields in the database.
I have a last_updated field which updates with the new date whenever any information is changed this works ok.
I also have a Auth_user field to log the username of the person making the change, which works after a fashion.
Currently when you open a record you will see:

Date Last Modified: (followed by the relevant date)
By: (Here I want it to be blank if no change has taken place or the last username who made the change.
What I get is my user name showing on the web page because I have logged on and when I save the record it will then update the Auth_user field in SQL.

The code Iam using on my web page is:
<tr>
<td colspan="4" align=right valign= top><div align="left"> <font color="#FF0000"><strong>By:</strong></font>
<%=Auth_User%></div></td>
</tr>

I hope this is not too confusing and any input would be greatly appreciated.

Regards
Redcare
 
Sorry I meant to post this as a question. Many apologies.
 
just bind the auth_user field from your recorset the same way as you have done the date

Cheech

[Peace][Pipe]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top