Passing Username from Login for Personalized Pages
I am using the following code within my login process page. The code works correctly in loging in a user but does not work caring the entered #Username# to the site. I do not think I am using (self.location="/secureindex.cfm?Username=#Username#";) correctly. Any suggestions...on my recieving page I have a query using the passed #Username# to load the persons first and last name into a welcome message. I will also be using the Username to record any edits the user makes to the site.
What am I doing wrong? My full code is....
<cfquery name="qVerify" datasource="MyDatasource">
SELECT Username, Password
FROM Clienttable
WHERE UserName = '#Username#'
AND Password = '#Password#'
</cfquery>
<cfif qVerify.RecordCount>
<cfset session.allowin = "True">
<cfset session.Username = qVerify.Username>
<script>
self.location="/secureindex.cfm?Username=#Username#";
</script>
< cfelse>
<script>
alert("My Alert");
self.location="Javascript:history.go(-1)";
</script>
</cfif>
Thanks so much!!
