show user name after they log in

Posted on 2005-05-05
Last Modified: 2013-12-24
How do I show user name after they log in
Question by:asamuel
    LVL 9

    Accepted Solution

    Hi asamuel,
    Dpends on what your using to log them in with, and where you do the compare. But how about pulling the information from the database as there name.

     <cfouput>#Username#</cfoutput> If your using the cflogin tags there is a tag that has the username that you could use to dispay to the browser.


    Author Comment

    I did what you said and i am getting the first name in the database
    do we missing something
    LVL 9

    Expert Comment

    what do you mean the first name, do you mean the users first name or the first name listed in the database.

    If the first scenario then you jsut need to do what you need to do with the query, if the second scenario then you need to do a where clause on your query for the data to be pulled out for that record.
    LVL 1

    Assisted Solution

    make sure you are only returning the users' record and not all records

    <cfquery datasource="dsn" name="q1">
    select username from tbl_users where id = #userid#



    Featured Post

    Live: Real-Time Solutions, Start Here

    Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

    Join & Write a Comment

    In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
    Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now