Skip to main content
Participant
June 20, 2012
Question

Help with calling user info in a session

  • June 20, 2012
  • 1 reply
  • 527 views

I'm (clearly) a newbie when it comes to ColdFusion programming, but I've learned some of the basics (queries, calling info from a SQL database, etc).

My question is, due to being totally unable to find an example online that FULLY explains how to do it, I'm trying to create a form where people can request a service (out of a selection), and then submit the info to a database. I am still working on the database/form, but my question is the fact that this page is only viewable by people who are already logged into the website. Now, I can do a query to get the information from the database about the user's info (name, contact info, department), but what I don't understand is how to call up their info while they are logged in so that their info is attached to the form submission to the database table I'm making.

I'm not looking for an entire coded response, but I am stuck on three different ways (and I don't know how different they really are); I've been exploring possibly doing an Application.cfc eventually, but would I be using a cffunction? Or is it cfmethod? I was also reading about cfparam, and I'm just totally stuck on which path to persue. I know I could possibly use a cfif statement, because that's the closest example I've found, but I also read that it's not the best for what I'm trying to do.

Can someone please at least point me in the right direction for which tags I need to be looking at? Thanks so much.

This topic has been closed for replies.

1 reply

Inspiring
June 20, 2012
Participant
June 20, 2012

I've already been through all of the Adobe help pages (hence why I ended up with my possible options); my issue is that I'm still thoroughly confused on which to use... The examples they use have so little to relate to what I'm doing that I'm still lost.

Inspiring
June 20, 2012

You are going to want an Application.cfc.  It will give you access to the session scope which you can use to persist the user information once they have logged in.