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

x
?
Solved

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

Posted on 2006-03-22
4
Medium Priority
?
203 Views
Last Modified: 2013-12-24
Hi..
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#'
</cfquery>

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

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

<CFIF Session.LoggedIn NEQ "True">
  <CFLOCATION URL="/students/jasocke2/checklogin1.cfm">
</CFIF>
<html>
<head><title>Login</title></head>
<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>&nbsp;</p>
    <p><i>.</i> </p>
  </div>
</div>
<div align="left">

</body>
</html>

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...
0
Comment
Question by:jasocke2
  • 2
  • 2
4 Comments
 
LVL 25

Expert Comment

by:dgrafx
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#
</cfif>
0
 

Author Comment

by:jasocke2
ID: 16256362
it's coming up...

Welcome #cookie.Username# ...

where abouts do I put it in the text?

(sorry for sounding stupid!!)
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 2000 total points
ID: 16256392
Hi
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 ...
0
 

Author Comment

by:jasocke2
ID: 16256487
Your a star!
Works a treat!
0

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