Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
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
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 98450 Viewers
61 Video lessons · 85739 Viewers
71 Video lessons · 69645 Viewers
56 Video lessons · 101971 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.