You could use Application.cfm (or a file that you include in relevant
places) to contain the whole login procedure and use self posting forms
for the login. This way you never leave the page you requested.

IF not logged in
   IF not coming from the login form
      Show the login form
      Abort
   IF coming from login form
      Verify login
      IF login not valid
         Show error message
         Show login form
         Abort
      ELSE
         Flag user as logged in

For the login form, you can use a self posting form, passing any
relevant info:

<cfparam name="form.loginform_login" default="">
<form name="login_form" action=""> method="post">
<cfloop collection="#form#" item="i">
<cfif FindNoCase("loginform_",i) NEQ 1 AND i NEQ "fieldnames">
<input name="#i#" type="hidden" value="#form[i]#">
</cfif>
</cfloop>
Login: <input name="loginform_login" type="text"
value="#form.loginform_login#"><br>
Password: <input name="loginform_password" type="password" value=""><br>
<input name="loginform_submit" type="submit" value="Login">
</form>

Pascal

> -----Original Message-----
> From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
> Sent: 07 September 2004 08:31
> To: CF-Talk
> Subject: Return Links (best practice)
>
> What are some of you doing to return people to where they were once
they
> have logged in.
>
> I am curious what are some of the best methods to returning users back
to
> where they came from after they log in.
>
> Example;  user is browsing your website and comes to a form to submit
some
> information.  But they have to be logged in as a member first.  So
instead
> of showing them the form, you re-direct them to the login page where
they
> can either login or sign up.
>
> Also assuming there are MANY places for this type of situation to
happen
> throughout the site.  What are some good methods to get them back
AFTER
> they have logged in and/or signed up.
>
> Thanks
>
>
> Paul Giesenhagen
> QuillDesign
> 417-885-1375
> http://www.quilldesign.com
>
>
>
>
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to