Hi,
I have a table called 'CompanyNotes' in this table are 5 fields:
NoteID
CompanyID => Links to Company Table
User ID => Links To Users Table
DateCreated
NoteContent
The idea is that people add notes to a company.
What I am trying to do is to automatically add the UserID to the record rather than have the user select their own name before adding the record to the database. I have read about $_SESSION("UserID") but my UserName field in my Users table holds an abbreviated name for login purposes i.e. 'auser'. So I added another field to the users table called FullName which is the users full name.
I made the UserID field read-only and added the $_SESSION("UserID") text to the field. When I Add a record the field shows the abbreviated user name as described above. However, when I go into the list view after a record is added, the UserID field is always '0'.
What I want is for the listing view to show the 'FullName' field but I want the database field UserID to retain the numeric UserID.
When I add a record I want the FullName to be displayed in the read-only field so the user doesn't have to enter it.
Can anyone help me here?
Regards,
Den.