Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to accomplish: www.mysite.com/123123 ?

Status
Not open for further replies.
just pass the userID as a param in all your links (assuming the user is logged on)

example:

Code:
<cfform action="myFormAction.cfm?login=yes" method="post">
 User: <cfinput type="text" name="usr" />
 <br />
 Password: <cfinput type="password" name="pass" />
 <br />
 <input type="submit" name="btnSubmit" value="login" />
</cfform>

<cfif IsDefined("URL.login")>
 <cfquery name="qUsers" datasource="myDataSource">
  SELECT * FROM tbl_Users WHERE txtUsr='#FORM.usr#' AND txtPass='#FORM.pass#'
 </cfquery>
 <cfif qUsers.RecordCount GT 0>
  <!--- do stuff --->
  <cfoutput>
   <a href="myLink.cfm?id=#qUsers.UserID#">My Link</a>
  </cfoutput>
 <cfelse>
  login failed
 </cfif>
</cfif>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top