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 log username who has updated a record.

Status
Not open for further replies.

redcare

Technical User
May 20, 2001
32
0
0
GB
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
 
just bind the auth_user field from your recordset to the page

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

Part and Inventory Search

Sponsor

Back
Top