Hi there,

I'm writing my own user login script, which is a very easy thing to do
in ColdFusion.  However, when I login to the database and set the
session variable, it just shows it as if it's plain text.  I've posted
sample code below:


<cfquery name="UserLogin" datasource="douglasmcgregor.co.uk"
dbname="douglasmcgregor.co.uk" dbserver=".\SQLEXPRESS" username="sa"
password="hidden for obvious reasons">
        SELECT * FROM tblUsers WHERE Username = '#form.Username#' AND
Password = '#hash(form.Password)#'
    </cfquery>

    <cfif #form.Username# Eq #UserLogin.Username# AND #form.Password#
Eq #hash(form.Password)#>
                <cfset session.FirstName Eq #UserLogin.FirstName# />
    </cfif>

    <cfoutput>session.FirstName</cfoutput>


To test it I've just tried to output the session variable as above,
but all it shows on the browser is session.FirstName.  Something's
obviously not working right, and is probably simple to fix, but I'm at
a loss to what it is.  Hope someone can help.

Thanks

Douglas

-- 
official tag/function reference: http://openbd.org/manual/
 mailing list - http://groups.google.com/group/openbd?hl=en

Reply via email to