Welcome back.
Now I'm going to be creating a complete admin dashboard where the admin you will be able to control
all products and all orders and payments.
Everything can be controlled from here.
Of course, you can control everything from the database, but it's also good to create an admin dashboard
where it's going to look better and it's going to be easier for you to control and monitor the complete
system to complete business from a single dashboard, a single protected dashboard.
So let's get started.
First of all, I have created this dashboard which consists of a few HTML files and it is going to display
the orders, the products, everything.
But this is a static template.
I have created this, but we need to convert this static template into a dynamic one.
We need to connect it to the database.
So if you have another admin dashboard that you want to use, feel free to do so.
There is no problem about this, but I'm going to be using my dashboard, my admin dashboard.
So the first step is that we need to include this admin dashboard.
And to do this, I'm going to keep it here.
And you folder called admin.
And then what I'm going to do is that I'm going to move all of these files over to the admin.
I'm going to copy all of them and then I'm going to paste them here inside this.
I'm going to miss them here.
So let me select all of them and then move them here so they will be moved.
So I have all of these.
However, we need to convert these into BHP.
So let me convert every single one.
Let's let's start with the log in.
So I'm going to here start with a log and I'm going to say BHP.
However, we need to start working on the log because the log in is the first page and then I'm going
to come back to these pages.
So let me first go to our our website.
And then in the website, remember here it's in the admin.
So let me say here, instead of saying index, I'm going to say admin and then forced log in dot BHP.
Now if I see like this, it's going to take me to the log in page.
However, if user if any user comes to this template, they will be able to control your products.
Therefore, the first thing that we need to do is that we need to protect the admin dashboard because
anybody who goes through the admin, they will be able to enter the admin dashboard.
As you can see, if I click on this or this or this, I will be able to control this.
So first the first thing that we need to do is that we need to work on the log into this log into this
log, which, by the way, before we start working on it, it's very important to know that the admin
dashboard should not should never have a registration system, because if you have a registration system,
normal users could create accounts and control your system.
So you only need to have log in system, only log in page and you need to create accounts manually using
the database.
So the first step is that I'm going to create here a new database.
I'm going to say your new.
And then I'm going to create a new database, a new database for a new table for admins.
I'm going to say admins.
And then I'm going to say here the first name is ID is going to be the main underscore ID.
And then we need the admin.
Maine and then.
Admin, email and password.
That's it.
We don't need anything else.
We just need all.
We just need these.
And then the idea is going to be integer.
The name is going to be the name is going to be far ga.
Varga.
Let's say 250.
The email is going to be text.
The password is just going to be a var card.
Or text.
You can also say text.
And that's it.
Now the admin it should have should be auto incrementally.
You should the select this auto increment and they should not be now.
All of them should not be in now.
And once you are done, all you need to do is that you need to click on going.
You need to click on Savior.
And as you can see, the table will be created.
And you need to make sure that here you have the admin ID auto increment.
Auto increment.
Now, let's say going over through the project and start working on the log into BHP.
The good news is that there is not there isn't much to work on because we already remember, we already
have created a lot of good and we can use a lot of the code that we created.
If you open the log in page that we have here, we can use the log in code that we have.
So here in the log in, we can use this code.
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.
To the end of their logic.
And then I'm going to paste it in the log in in the admin logging.
So in the admin log at this log that's inside the admin at the top.
And then what I'm going to do is that first of all, since we are inside the admin, we need to go back
to the we need to say that, that because we need to go back first and then after we go back we need
to access the server.
So we say that on the server and then connection.