So the last step in displaying users is very simple, and it's right down here in the statement in the
final then clause, we check to make sure there's data.
If data, then we do something else, we do something else.
And our table only has two columns, user and email.
So down here, if there is data, we'll do pretty much the same thing we did when we were listing.
All sales are all subscriptions data for each.
And we're on a function and we'll call the current iteration on
and we'll create a new row, new row, equal Peabody dot insert row
and we'll let new cell equal.
Neuro insert, so then we just populate the cell, new cell, the inner HTML is going to be equal to
and only make it a JavaScript template to make it easy and a link a traffic equals.
And the path we want is slash.
It means all users slash.
And then the end of the current generation, which is Dorson, open, curly bracket ID, and then we
put in the user's first name and last name.
I the last name,
comma, a space and a dollar sign on a first name,
and we just close our e-TAG.
And our template.
Then we create another cell, new cell equals neuro insert cell, and we'll create an item item, equal
document to create text node and it will just be idot email and new cell appen child.
Now, this next situation should never actually happen because we should never be able to get to this
page if there's nothing in the user's table.
But just to be safe, let neuro equal Tebaldi dot insert wrote
and let new cell equal Tebaldi dot insert cell.
New cell set its attribute and the attribute we want is called spane.
We'll make that too.
And new.
So Dath Interactive equals no data available.
And as I said, that never should execute.
But technically it's possible for someone to log in and after that person logs in, someone deletes
the entries from the database and they're still logged in.
But they're entering.
The database doesn't exist anymore, so we'll check for it.
So let's try this start.
Back to our Web browser and let's reload this page and there it is.
We have a link to user comma admin and I click on that and it should take me to a page not found.
So what did I get wrong in the early?
I want to check on that.
All right.
So the URL I'm using is slash admin, slash all user.
It should be all Dasch users.
Save that.
We start the application.
And let's reload the reload, and now it should take us to the user page.
All right, there we go.
So the next step is to actually allow ourselves to add, edit and delete users.
And we'll get started on that in the next lecture.