Skip to main content
Participant
July 5, 2008
Question

Getting logged-in -user's information from db

  • July 5, 2008
  • 1 reply
  • 221 views
Hello!

I've got what I'm sure is a very simple question with a very simple answer. I'm a bit of a newbie however, so I've having a bit of trouble. Any help would be appreciated.

I've got a blog-type application where after I log the user in (via cflogin and cfloginuser in an Application.cfc with loginstorage set to 'session'), I'd like to retrieve information about said user from the database to populate form fields on subsequent pages. For example, I'd like an 'author' field to be automatically set to the logged-in user's 'firstname' as defined in the database. Does this make sense? Can you help me? Thank you for any help you can provide.
    This topic has been closed for replies.

    1 reply

    Inspiring
    July 6, 2008
    Use the cfquery tag to query the database. If you don't know how to write sql, I have heard good things about the book, Teach Yourself SQL in 10 Minutes by Ben Forta.