Viewers: in countries Watching now:
An important but little-understood concept in dynamic web development is that of role-based logins, which allow different types of users to access different parts of the site. In this course Adobe Certified Expert Candyce Mairs shows how to use Dreamweaver's features to create role-based logins, restrict page access, build an administrator area, and test everything to make sure it works. Plus, see how to set up a development environment and work with a database from within Dreamweaver. Along the way, build your skills in areas like working with PHP, adding form validation, using server behaviors, and much more.
The first step in building our administrative area, to update users within our members area, is to populate a table with all of our members' information. So I am on the admin user list page. And what we're going to do, is add information about every user within this table. So, this table will be a complete listing of all of our members, and their details. So how do we go about building this table? Well, this table needs to access database information.
So, our table will contain information from within our log in table in the database. So, these pieces of information from within our login table, will go within the various sections of the table for each number. So, the first thing we need to do is build a database query. We need to query the database for all of that data. In order to do that, I'll click the Bindings tab. In case the Bindings tab is not open. It is listed in the Window menu and available there. Within the bindings tab, I will click the plus sign and choose Record Set. We're going to create a query of this particular login table. So, I will call this query Q members.
It's going to pull out all of the members and their data. Our connection is the Con Login connection. The same one we've been using throughout this course. The table we will work in is the login table. And what I am going to do, is pull out all of the information from that table. I don't need to filter based on anything, but I do need to sort based on, let's see how we should put these, probably in alphabetical order based on last name. So why don't we sort these based on last name.
I will test this and there is our member information. We don't have too many members populating this area. You can see some of our members are missing information. So, we can go ahead and once this update is fixed, and all set up, we can update these users information. So we only have five listings right now. The fifth listing, is from our insert user, inserting a new member movie, so you may only have four records within the database if you did not go through that movie.
I will click OK. And we now have our record set. So, I will simply click on the record set and drag it into my table. So, first name goes into the first name area. Last name goes into last name. Country. Now, there is a way to build this table in another manner. Using the dynamic table and that's a specific Dreamweaver feature. I will click user name is what goes into email.
Now you can see that my table is getting stretched here. Don't worry too much about that. Dreamweaver's just trying to show you all of this information. When we go to preview, that's how it will actually look. So I've pulled the data out. I will save this page, and preview it in the browser. You can see I'm taken to the login form. I do need to login as an administrator, in order to be able to do this. So the administrative role is email@example.com.
Password candace. I'll click login, and there is our information. So, you can see this is pulling out only the first row of data. In order to get all of these queries, I need to pull information out and add a repeat region. Now if you use the dynamic table to do this process, it automatically adds that repeat region for you. Since I did not do it that way, what I want to do is select the table row and add the repeat region server behavior. So some of the features within Dreamweaver, do add mulitple server behaviors for you at the same time.
How do I access that table row? Well if I get this little left arrow on the left-hand side of the table, I can select it and hit the table row. Sometimes that's tricky to be able to get that arrow, so the easiest way is put your cursor anywhere within that row and click the TR tag down here in the tag selector. That allows you to select the table row. So I've selected that. I can go out to my server behaviors. I can click the plus sign and say repeat region.
I'm going to repeat the region, based on that record set we created called Q members and I'm going to say, show all records. We only have five at this point so I will show them all at one time. Now let's take a look at our table. I will save that, preview it in the browser. I do need to log in once again. If you kept your browser window open, you would not need to log in again. Password is candace, all lower case.
Click login, there is our data. So we're pulling the data out into a nice neat table. Now you can see how this table is much narrower, than the table looks in Dreamweaver. Once you populate the information, always put it in the browser to make sure it looks okay. Now my user id, first name last name, I could make this a little bit wider. In order to do that so it doesn't move to two lines, I would want to make my table larger.
I'm not going to worry about that at this point. The next piece we need to set up is, how do we get this user id area here, set up as a hyperlink. So, once the user clicks the user id for a member, it takes them to the next page which will be the user update page and populates this page with that specific users information. And that will cover make it this into a hyperlink to the next page, and the next page will populate the form with that users information, so lets move on to setting this up as a hyperlink
There are currently no FAQs about Dynamic Dreamweaver Websites: Creating Login Areas.
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.