WEBVTT 00:01.470 --> 00:06.300 So the last step in displaying users is very simple, and it's right down here in the statement in the 00:06.300 --> 00:09.170 final then clause, we check to make sure there's data. 00:10.140 --> 00:15.810 If data, then we do something else, we do something else. 00:15.930 --> 00:19.800 And our table only has two columns, user and email. 00:20.640 --> 00:24.510 So down here, if there is data, we'll do pretty much the same thing we did when we were listing. 00:24.510 --> 00:28.260 All sales are all subscriptions data for each. 00:31.920 --> 00:35.880 And we're on a function and we'll call the current iteration on 00:39.450 --> 00:46.650 and we'll create a new row, new row, equal Peabody dot insert row 00:49.380 --> 00:51.960 and we'll let new cell equal. 00:53.290 --> 01:03.580 Neuro insert, so then we just populate the cell, new cell, the inner HTML is going to be equal to 01:03.580 --> 01:09.700 and only make it a JavaScript template to make it easy and a link a traffic equals. 01:09.700 --> 01:11.190 And the path we want is slash. 01:11.260 --> 01:13.840 It means all users slash. 01:13.850 --> 01:21.610 And then the end of the current generation, which is Dorson, open, curly bracket ID, and then we 01:21.610 --> 01:23.530 put in the user's first name and last name. 01:25.420 --> 01:26.760 I the last name, 01:30.010 --> 01:34.000 comma, a space and a dollar sign on a first name, 01:37.480 --> 01:38.890 and we just close our e-TAG. 01:42.740 --> 01:43.820 And our template. 01:45.490 --> 01:57.910 Then we create another cell, new cell equals neuro insert cell, and we'll create an item item, equal 01:58.750 --> 02:09.370 document to create text node and it will just be idot email and new cell appen child. 02:12.610 --> 02:17.830 Now, this next situation should never actually happen because we should never be able to get to this 02:17.830 --> 02:19.890 page if there's nothing in the user's table. 02:19.900 --> 02:26.770 But just to be safe, let neuro equal Tebaldi dot insert wrote 02:29.890 --> 02:34.420 and let new cell equal Tebaldi dot insert cell. 02:37.540 --> 02:43.330 New cell set its attribute and the attribute we want is called spane. 02:45.040 --> 02:45.970 We'll make that too. 02:47.530 --> 02:48.000 And new. 02:48.010 --> 02:53.820 So Dath Interactive equals no data available. 02:54.280 --> 02:56.590 And as I said, that never should execute. 02:56.590 --> 03:02.320 But technically it's possible for someone to log in and after that person logs in, someone deletes 03:02.320 --> 03:05.140 the entries from the database and they're still logged in. 03:05.470 --> 03:06.190 But they're entering. 03:06.190 --> 03:08.810 The database doesn't exist anymore, so we'll check for it. 03:09.400 --> 03:12.550 So let's try this start. 03:16.570 --> 03:22.120 Back to our Web browser and let's reload this page and there it is. 03:22.150 --> 03:28.000 We have a link to user comma admin and I click on that and it should take me to a page not found. 03:28.030 --> 03:29.470 So what did I get wrong in the early? 03:29.620 --> 03:30.700 I want to check on that. 03:30.970 --> 03:31.350 All right. 03:31.360 --> 03:34.720 So the URL I'm using is slash admin, slash all user. 03:35.070 --> 03:37.210 It should be all Dasch users. 03:37.420 --> 03:38.040 Save that. 03:38.890 --> 03:40.120 We start the application. 03:46.440 --> 03:52.050 And let's reload the reload, and now it should take us to the user page. 03:52.440 --> 03:54.420 All right, there we go. 03:54.540 --> 03:59.070 So the next step is to actually allow ourselves to add, edit and delete users. 03:59.070 --> 04:01.320 And we'll get started on that in the next lecture.