Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


From login page... Welcome #username#.. problems..

Posted on 2006-03-22
Medium Priority
Last Modified: 2013-12-24
I wonder of any of you can help...

I have 3 files... login.cfm, login5.cfm, and checklogin cfm..

The login.cfm is a screen where you put your username and password, press ok and it goes to login5.cfm>>

<cfquery name="check" datasource="jasvasquez-access">
  select * from Users where user_ID = '#form.username#' and password = '#form.password#'

<cfif check.recordcount is "1">
  <cfoutput query="check">
    <cfset session.loggedin = "true">
  <script language="JavaScript">
     alert( 'You sucessfully logged in ... Please press ok!.');
  <script language="JavaScript">
    alert( 'Please check your username and password, then try again.');

Then you press ok and it directs you to checklogin.cfm>>

<CFIF Session.LoggedIn NEQ "True">
  <CFLOCATION URL="/students/jasocke2/checklogin1.cfm">
<body bgcolor="#FFFFFF" text="#000000">
<div align="center"></div>
<div align="center">
  <p align="left"><a href="allgigs.cfm">View all Gigs</a></p>
  <p align="left"><a href="addgig.cfm">Add Gig</a></p>
  <p align="left"><a href="update1.cfm">Update Gig</a></p>
  <p align="left"><a href="newsupdate.cfm">Change News</a></p>
    <p align="left"><a href="delete.cfm">Delete a played Gig</a></p>
  <div align="left">
    <p><i>.</i> </p>
<div align="left">


what I want is pretty simple (I think) although I've tried alsorts and it wont work!!
I want it so when you login it says Welcome (and then the username that you put in on the first screen)...

and ideas?
All I have been getting is username not defied in form!
Thanks in advance...
Question by:jasocke2
  • 2
  • 2
LVL 25

Expert Comment

ID: 16256317
OK - Try putting (on your first form action page - where you have the query where user_ID = '#form.username#' and password = '#form.password#')
<cfcookie name="Username" value="#form.Username#">
Then where ever you want put
<cfif isDefined("cookie.Username")>
Welcome #cookie.Username#

Author Comment

ID: 16256362
it's coming up...

Welcome #cookie.Username# ...

where abouts do I put it in the text?

(sorry for sounding stupid!!)
LVL 25

Accepted Solution

dgrafx earned 2000 total points
ID: 16256392
I guess I don't know what you mean exactly
Are you saying this is exactly how you see it "Welcome #cookie.Username# ..."
If so - you need <cfoutput> tags around it "Welcome <cfoutput>#cookie.Username#</cfoutput> ..."
Let me know if thats not it ...

Author Comment

ID: 16256487
Your a star!
Works a treat!

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Kernel Data Recovery is a renowned Data Recovery solution provider which offers wide range of softwares for both enterprise and home users with its cost-effective solutions. Let's have a quick overview of the journey and data recovery tools range he…
Suggested Courses
Course of the Month15 days, 4 hours left to enroll

578 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