Skip to main content
January 15, 2007
Answered

Visitor login to unique members area

  • January 15, 2007
  • 2 replies
  • 366 views
New to Dreamweaver with no coding skills other than html. I am building a site with different members areas and different access levels. Started a test site using php, set up my data base (phpMySQL), fields are username, password, access. Dreamweaver has connected to my data base but the server behavior settings only seems to allow a single destination page. Using php can I send a visitor to a page according to their username? I did read that Cold Fusion could handle this however my server does not support CF. Any help would be greatly appreciated.
This topic has been closed for replies.
Correct answer Newsgroup_User
twoaspen wrote:
> Dreamweaver has connected to my data base but the server behavior
> settings only seems to allow a single destination page. Using php can I send a
> visitor to a page according to their username?

Yes, but it involves making a minor change in Code view. Apply the Log
In User server behavior using an ordinary page. For the sake of this
example, call it menu.php.

In Code view, find the following line:

$MM_redirectLoginSuccess = "menu.php";

Change it to this:

$MM_redirectLoginSuccess = "$loginUsername.php";

This will redirect the user to a page that uses his/her username. For
example, if the username is dpowers, it will redirect a successful login
to dpowers.php.

If you want to redirect to a different folder, you can add the rest of
the relative path inside the quotes, for example:

$MM_redirectLoginSuccess = "../users/$loginUsername.php";

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

2 replies

January 16, 2007
Thanks for the help, I'll have to spend more time with php.
Newsgroup_UserCorrect answer
Inspiring
January 15, 2007
twoaspen wrote:
> Dreamweaver has connected to my data base but the server behavior
> settings only seems to allow a single destination page. Using php can I send a
> visitor to a page according to their username?

Yes, but it involves making a minor change in Code view. Apply the Log
In User server behavior using an ordinary page. For the sake of this
example, call it menu.php.

In Code view, find the following line:

$MM_redirectLoginSuccess = "menu.php";

Change it to this:

$MM_redirectLoginSuccess = "$loginUsername.php";

This will redirect the user to a page that uses his/her username. For
example, if the username is dpowers, it will redirect a successful login
to dpowers.php.

If you want to redirect to a different folder, you can add the rest of
the relative path inside the quotes, for example:

$MM_redirectLoginSuccess = "../users/$loginUsername.php";

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/