Complete Login & Registration System | PHP | MySQL | Session | PHP Tutorial | Yes I Can Do

Опубликовано: 01 Октябрь 2024
на канале: Yes I Can Do
2,107
14

#Login_System #PHP and #MySQL, #Complete_Registration_System With #Session #Yes_I_Can_Do
----------------------------------------------------------------------------------------------------------------------------------------
You Have to Create These, Step by Step Guide:
1. Database and Insert Table
2. Registration Form
3. Login Form
4. Connect to Database
5. Authentication
6. Index page
7. Dashboard Page
8. Logout
9. CSS File for Styling

Special Note: I gave Database, files, classes names from my own choice. you can change these names in your case.

1.Create a Database and Table
First, you have to create a database. So, Login in your Cpanel or localhost then goes to phpmyadmin. For create database go to to database section and type database name “register” and click on create.

After creating database successfully, Now create Database table, You can create table manually If you confuse about that. No Problem, Click on your Database named “register” then go “Query ” section paste this code and click on submit query.

SQL Query Code:
CREATE TABLE IF NOT EXISTS `users` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(50) NOT NULL,
`email` varchar(50) NOT NULL,
`password` varchar(50) NOT NULL,
`trn_date` datetime NOT NULL,
PRIMARY KEY (`id`)
);

2.Connect To Database
Create a file named “db.php” and paste these codes below. This function is for Connect database to this program.

3.Create Authentication File for Secure
Create a file named “auth.php” and paste codes below. This file creates session, for security and store cookies.

4.Create Registration Page
Now you have to create a registration form. Basically, this form built-in HTML & CSS and functions are in PHP.

Create a Php file named “registration.php” and paste these codes and save it.
registration.php

5.Create Login Page
Now create a file and save it with named “login.php” and paste the following codes given below.

6.Create an Index Page
What after login? of-course index page. So, create a page named “index.php” and pastes these codes give below.

7.Now Create a Dashboard Page
After created index page now you have create dashboard page. Basically, This is Profile Section. Now Create a file named “dashboard.php” .

8.Create Logout File
Basically, this file is to destroy session and redirect to index page. So, create a file named “logut.php”

9.Now Finally Give Style with CSS On This login PHP system
The last thing create a CSS file to give style this program. Without CSS this program is only a frame. Create a file named style.css






----------------------------------------------------------------------------------------------------------------------------------------
#pythonlearning #pythoncode #python3 #coder #learntocode #Tutorial