If you want to pass variables in the short term, using session variables are the best.
in your application enable session variables with something like
<cfapplication name="whatevername" sessionmanagement="Yes">
then do you can do a example below of querying a database to get and set session variables. You will need to read up on <cflock> to make you don't crash your cfserver when using session variables.
<!--- Find record with this Username/Password --->
<!--- If no rows returned, password not valid --->
<CFQUERY NAME="GetUser" DATASOURCE="#DataSource#">
SELECT NickName, CompanyName
FROM Customers
WHERE NickName = '#Form.UserLogin#'
AND Password = '#Form.UserPassword#'
</CFQUERY>
<!--- If the username and password are correct --->
<CFIF GetUser.RecordCount EQ 1>
<!--- Remember user's logged-in status, plus --->
<!--- ContactID and First Name, in structure --->
<CFSET SESSION.Auth = StructNew()>
<CFSET SESSION.Auth.IsLoggedIn = "Yes">
<CFSET SESSION.Auth.NickName = GetUser.NickName>
<CFSET SESSION.Auth.CompanyName = GetUser.CompanyName>
<!--- Now that user is logged in, send them --->
<!--- to whatever page makes sense to start --->
<CFLOCATION URL="#CGI.SCRIPT_NAME#">
<CFELSEIF GetUser.RecordCount EQ 0>
<tr><td colspan="2" align="center" class="stfont2">Incorrect Account Number or Password.</td></tr>
</CFIF>