Hi there, I'm a newbie to PHP and not too bad in Dreamweaver MX.
What I'm doing is setting up a site that is public, but has a private section that is linked from the site home page in the root directory.
All of the private pages files, including the log in page, are located in a "private_pages" folder in the root directory.
Also worth noting I am running Apache and MySQL on my local machine and testing this as localhost. The login table has three feilds, username, password, and email. I have the following pages in the private section:
private_login.php
private_home.php (displayed if login succeeds)
private_login_fail.php
private_access_denied.php (to be displayed if someone types the url of a private page into a browser)
Lets just say that these pages are blank at the moment bar their name written on them.
Now, I've run through a short tutorial on setting this up, and everything works fine. The login page uses dreamweavers "log in" user authentication server behavior with the private_home page as the successfull link, and private_login_fail as the failed link. This works perfectly.
The trouble occurs at the last step of the tutorial where I am told to restrict access to the pages that are private using the restrict access server behavior. In this case, only the private_home page needs this. This behavior is set to "username and password", and redirected to private_access_denied.php if the user is invalid.
Once this behavior is set, the private_access_denied page is displayed no matter what. eg, no log in occurs. But if i remove the restrict access behavior, loging in works fine.
This tutorial ends at this last point, and makes no mention of session variables etc.
Is a major part of this project missing (eg Session variable knowledge?)
Thanks
Aaron
What I'm doing is setting up a site that is public, but has a private section that is linked from the site home page in the root directory.
All of the private pages files, including the log in page, are located in a "private_pages" folder in the root directory.
Also worth noting I am running Apache and MySQL on my local machine and testing this as localhost. The login table has three feilds, username, password, and email. I have the following pages in the private section:
private_login.php
private_home.php (displayed if login succeeds)
private_login_fail.php
private_access_denied.php (to be displayed if someone types the url of a private page into a browser)
Lets just say that these pages are blank at the moment bar their name written on them.
Now, I've run through a short tutorial on setting this up, and everything works fine. The login page uses dreamweavers "log in" user authentication server behavior with the private_home page as the successfull link, and private_login_fail as the failed link. This works perfectly.
The trouble occurs at the last step of the tutorial where I am told to restrict access to the pages that are private using the restrict access server behavior. In this case, only the private_home page needs this. This behavior is set to "username and password", and redirected to private_access_denied.php if the user is invalid.
Once this behavior is set, the private_access_denied page is displayed no matter what. eg, no log in occurs. But if i remove the restrict access behavior, loging in works fine.
This tutorial ends at this last point, and makes no mention of session variables etc.
Is a major part of this project missing (eg Session variable knowledge?)
Thanks
Aaron