Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
At this points in the course, we have setup all of our register a new user, or a new number specifically, within our Scuba2u website. We've also setup the log in area. And those two are working just fine. The problem is, anybody can still go out and Preview any of our member's pages at this point. So, the piece that's easy to forget, since you're focusing on adding form functionality, is that within our members' area, we have quite a few pages. So the idea is, the user registers to get a user name, to become a member. They log in to the members area and only members can access this information. And right now, I have members, videos as an example in my website. Now, if I put this into the browser and browse out to it, there is nothing preventing me from going to this page at this point. So, what we need to do is go in and take all of these pages with the word members in front of them, and restrict the access to that page, to only people who are logged in.
I'll open up members Candice, since it's the top of the list here, in alphabetical order. And we will start here. Now, how do we make sure only logged in users can view this page? We use Dreamweaver Server Behaviors to do that. I'll click the plus sign and down in User Authentication. This is the piece we need to add to each one of those pages. Now, before building these pages, I could have, on my members home page, added this server behavior. And then, I can use that page from that point on, anytime I need a new page for the members area, if I use that page as my base page and save out from that. I would automatically have that on there.
Since I'm providing you these files, they're already created. So, we need to add it individually. So, I will go out to a Server Behaviors > User Authentication > Restrict Access To Page. Now, we're simply going to restrict this page to user name and password. If access is denied, we will take them out to the Log In page to log in. Now, the assumption here is if we take them to the log in page that the log in page has a way to get them back to the register page if they haven't yet registered.
They may have just forgotten to log in. So, some of our other pages do need to add some features within this area. I'm assuming that has been done at this point for our course. So, if access is denied, I will take them to the Log In page, where they can log in and be able to access this page. I will Save this page. Preview it in the browser. And now, notice I'm taken to the Log In page, when I try and view that particular page.
It sent me immediately to the Log In area. What I need to do is go through all of these pages and do the same thing. So, I will select the Server Behaviors, go down to User Authentication > Restrict Access to Page. I will say, username and password. If access is denied, go to Log In. So, I'm just repeating this exact same process for every page within the member area.
Members home needs this as well. So, every page that has members in the first part of the name, I will be doing this same thing to. And there you have it. Now, I'm not going to make you watch me do these next five pages. I've added some Flash videos inside this member's area, to give you a chance to navigate within the member's section. But for right now, if I go out to member's home.
Preview it in the browser, it takes me to Log In. If I go to Log In, I'll plug in my information. I should be able to log in. Notice when I logged in, it immediately took me to the page I was requesting initially, which is the member's home page. So, go ahead and add that same functionality, restrict access to page, to the rest of the pages within this member's area.
And go out and test these pages. Once you are logged in, you should be able to navigate around these pages. So, once you get to the member's area, I should be able to go to the Videos page and the Photos page without needing to log in again. I don't have those set up. Those are two of the pages down here that I don't have any access restricted on. So, I'm not going to show you that piece. But that is the Restrict Access to Page server behavior within Dreamweaver.
Get unlimited access to all courses for just $25/month.Become a member
61 Video lessons · 92675 Viewers
82 Video lessons · 104187 Viewers
71 Video lessons · 75794 Viewers
56 Video lessons · 107169 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.