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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating Username Field on table based on current user logged in

Status
Not open for further replies.

cdw0308

Technical User
Oct 8, 2003
181
US
I am trying to have a hidden input field that is on my newcontact.cfm page update to the username of the person logged in making that new contact. What i am trying to acheive is a way to filter the contacts per user. So when they log in they only see their contacts.
Can someone help me. I have created the login page. I also have a field called username on my user table which contains the login information. On my contacts table I have a field called user_name. I am trying to update the user_name field on the contacts table.

I am not sure how to record and pass the session username to the field in the table and save it.
 
if you have users logged in you can just use the session variable holding the users name.

If you don't ask the right questions, you don't get the right answers. A question asked in the right way often points to its own answer. Asking questions is the ABC of diagnosis. Only the inquiring mind solves problems.

-Quote by Edward Hodnett
 
Could you give me an example of how to pass it to the field value. Would i use a cfset or a update statement, etc?
 
I figured out what i was doing wrong.
Thanks for the help.
 
Please post your findings as others may encounter this very scenario.

rojas1mg - - - I love Tek-Tips and all members who reply.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top