1 00:00:00,150 --> 00:00:00,840 Welcome back. 2 00:00:01,140 --> 00:00:09,480 Now I'm going to be creating a complete admin dashboard where the admin you will be able to control 3 00:00:09,480 --> 00:00:12,170 all products and all orders and payments. 4 00:00:12,180 --> 00:00:13,860 Everything can be controlled from here. 5 00:00:14,310 --> 00:00:21,270 Of course, you can control everything from the database, but it's also good to create an admin dashboard 6 00:00:21,270 --> 00:00:26,880 where it's going to look better and it's going to be easier for you to control and monitor the complete 7 00:00:27,810 --> 00:00:33,480 system to complete business from a single dashboard, a single protected dashboard. 8 00:00:33,870 --> 00:00:34,770 So let's get started. 9 00:00:35,160 --> 00:00:45,660 First of all, I have created this dashboard which consists of a few HTML files and it is going to display 10 00:00:45,660 --> 00:00:47,940 the orders, the products, everything. 11 00:00:47,940 --> 00:00:50,990 But this is a static template. 12 00:00:51,000 --> 00:00:56,190 I have created this, but we need to convert this static template into a dynamic one. 13 00:00:56,190 --> 00:00:57,570 We need to connect it to the database. 14 00:00:58,230 --> 00:01:02,970 So if you have another admin dashboard that you want to use, feel free to do so. 15 00:01:03,240 --> 00:01:09,420 There is no problem about this, but I'm going to be using my dashboard, my admin dashboard. 16 00:01:09,840 --> 00:01:13,590 So the first step is that we need to include this admin dashboard. 17 00:01:13,920 --> 00:01:15,270 And to do this, I'm going to keep it here. 18 00:01:15,270 --> 00:01:17,190 And you folder called admin. 19 00:01:19,480 --> 00:01:23,830 And then what I'm going to do is that I'm going to move all of these files over to the admin. 20 00:01:23,860 --> 00:01:28,750 I'm going to copy all of them and then I'm going to paste them here inside this. 21 00:01:29,920 --> 00:01:30,940 I'm going to miss them here. 22 00:01:32,900 --> 00:01:38,960 So let me select all of them and then move them here so they will be moved. 23 00:01:39,860 --> 00:01:40,820 So I have all of these. 24 00:01:40,820 --> 00:01:44,000 However, we need to convert these into BHP. 25 00:01:44,450 --> 00:01:46,830 So let me convert every single one. 26 00:01:46,850 --> 00:01:49,090 Let's let's start with the log in. 27 00:01:49,130 --> 00:01:52,940 So I'm going to here start with a log and I'm going to say BHP. 28 00:01:53,420 --> 00:01:59,060 However, we need to start working on the log because the log in is the first page and then I'm going 29 00:01:59,060 --> 00:02:00,770 to come back to these pages. 30 00:02:01,310 --> 00:02:06,230 So let me first go to our our website. 31 00:02:10,110 --> 00:02:13,740 And then in the website, remember here it's in the admin. 32 00:02:14,130 --> 00:02:23,700 So let me say here, instead of saying index, I'm going to say admin and then forced log in dot BHP. 33 00:02:24,510 --> 00:02:27,360 Now if I see like this, it's going to take me to the log in page. 34 00:02:27,810 --> 00:02:33,180 However, if user if any user comes to this template, they will be able to control your products. 35 00:02:33,630 --> 00:02:38,430 Therefore, the first thing that we need to do is that we need to protect the admin dashboard because 36 00:02:38,580 --> 00:02:43,490 anybody who goes through the admin, they will be able to enter the admin dashboard. 37 00:02:43,500 --> 00:02:48,180 As you can see, if I click on this or this or this, I will be able to control this. 38 00:02:48,200 --> 00:02:54,390 So first the first thing that we need to do is that we need to work on the log into this log into this 39 00:02:54,390 --> 00:03:00,960 log, which, by the way, before we start working on it, it's very important to know that the admin 40 00:03:00,960 --> 00:03:09,270 dashboard should not should never have a registration system, because if you have a registration system, 41 00:03:09,840 --> 00:03:14,880 normal users could create accounts and control your system. 42 00:03:14,880 --> 00:03:21,990 So you only need to have log in system, only log in page and you need to create accounts manually using 43 00:03:21,990 --> 00:03:22,500 the database. 44 00:03:23,040 --> 00:03:25,590 So the first step is that I'm going to create here a new database. 45 00:03:25,590 --> 00:03:26,670 I'm going to say your new. 46 00:03:27,720 --> 00:03:35,250 And then I'm going to create a new database, a new database for a new table for admins. 47 00:03:35,250 --> 00:03:36,390 I'm going to say admins. 48 00:03:37,870 --> 00:03:44,410 And then I'm going to say here the first name is ID is going to be the main underscore ID. 49 00:03:45,370 --> 00:03:47,110 And then we need the admin. 50 00:03:49,710 --> 00:03:52,140 Maine and then. 51 00:03:53,190 --> 00:03:55,950 Admin, email and password. 52 00:03:56,760 --> 00:03:57,230 That's it. 53 00:03:57,240 --> 00:03:58,440 We don't need anything else. 54 00:03:58,440 --> 00:03:59,350 We just need all. 55 00:03:59,550 --> 00:04:00,540 We just need these. 56 00:04:02,790 --> 00:04:05,250 And then the idea is going to be integer. 57 00:04:05,250 --> 00:04:09,960 The name is going to be the name is going to be far ga. 58 00:04:13,570 --> 00:04:14,220 Varga. 59 00:04:15,520 --> 00:04:17,140 Let's say 250. 60 00:04:17,740 --> 00:04:20,240 The email is going to be text. 61 00:04:21,250 --> 00:04:24,700 The password is just going to be a var card. 62 00:04:28,600 --> 00:04:29,220 Or text. 63 00:04:29,230 --> 00:04:30,310 You can also say text. 64 00:04:32,620 --> 00:04:33,640 And that's it. 65 00:04:33,670 --> 00:04:39,010 Now the admin it should have should be auto incrementally. 66 00:04:39,190 --> 00:04:43,250 You should the select this auto increment and they should not be now. 67 00:04:43,270 --> 00:04:45,330 All of them should not be in now. 68 00:04:46,180 --> 00:04:50,650 And once you are done, all you need to do is that you need to click on going. 69 00:04:51,550 --> 00:04:52,840 You need to click on Savior. 70 00:04:54,720 --> 00:04:56,790 And as you can see, the table will be created. 71 00:04:57,880 --> 00:05:03,220 And you need to make sure that here you have the admin ID auto increment. 72 00:05:03,610 --> 00:05:04,360 Auto increment. 73 00:05:06,220 --> 00:05:11,050 Now, let's say going over through the project and start working on the log into BHP. 74 00:05:11,530 --> 00:05:16,960 The good news is that there is not there isn't much to work on because we already remember, we already 75 00:05:16,960 --> 00:05:21,280 have created a lot of good and we can use a lot of the code that we created. 76 00:05:21,790 --> 00:05:27,310 If you open the log in page that we have here, we can use the log in code that we have. 77 00:05:27,880 --> 00:05:32,290 So here in the log in, we can use this code. 78 00:05:32,830 --> 00:05:38,650 So what I'm going to do is that I'm going to copy this code starting from here all the way to the end. 79 00:05:39,930 --> 00:05:41,040 To the end of their logic. 80 00:05:43,450 --> 00:05:47,800 And then I'm going to paste it in the log in in the admin logging. 81 00:05:48,100 --> 00:05:52,060 So in the admin log at this log that's inside the admin at the top. 82 00:05:54,710 --> 00:06:01,490 And then what I'm going to do is that first of all, since we are inside the admin, we need to go back 83 00:06:01,490 --> 00:06:08,330 to the we need to say that, that because we need to go back first and then after we go back we need 84 00:06:08,330 --> 00:06:09,170 to access the server. 85 00:06:09,170 --> 00:06:11,690 So we say that on the server and then connection.