Skip to main content
Participating Frequently
Jul 27, 2009 7:27 PM UTC
Question

creating login page - direct users to a unique file based on unique id?

Hello - I am in the process of creating a login page that will direct users to a unique page based on their unique id.  I would normally go to Server Behaviors>User Auth>Log In User, but that gives me the option of browsing only one file for all usernames and that's not what I need.  So basically, if the user logs in with the Caterpillars username, it takes them directly to the Caterpillars page and if they log in with the Butterflies username, it takes them to the Butterflies page (yes, it's a preschool with goofy classroom names!).  If it matters, I'm using MySql and the page is .php.  I tried to upload the php, but it gave me an error "the content type of this attachment is not allowed" - not sure what that's all about - sorry.

Thanks in advance!!

This topic is closed to new replies. Start a new post to keep the conversation going.

12 replies

DwFAQ
Participating Frequently
Jul 27, 2009 7:50 PM UTC

Heya,

You said this:

that gives me the option of browsing only one file for all usernames and that's not what I need.

And actually one dynamic file is all you need...

Create a log in user server behavior on the login page like you would usually do and in redirect page for successful login have it go to something like success.php Then you can create a filtered recordset on the success.php page filtered where table column for id = session variable set for logged in users id. Then the page wil display info dynamically based on the logged in users id. To learn how to create a session variable look here http://kb2.adobe.com/cps/165/tn_16563.html your users ID may already be created as a session variable MM_UserGroup so try that first in your filtered recordset.

Translate
Participating Frequently
Jul 27, 2009 9:55 PM UTC

Thanks!  I thought it made sense until now.  I have the username session on the success.php page and the login works great, but I still don't understand how I tell it do display a different page for each username (i.e. caterpillars username takes you to the caterpillars page, butterflies username takes you to the butterflies page, etc).  It's got to be some sort of "if/then" thing...right?

Translate
DwFAQ
Participating Frequently
Jul 27, 2009 11:05 PM UTC

Please read again:

create a filtered recordset on the success.php page filtered where table column for id = session variable set for logged in users id. Then the page wil display info dynamically based on the logged in users id.
Translate