Login Page in PHP and MySQL with Source Code


Today I’m going to show you, Login Page, in PHP with a Database namely MySQL with Source Code. Login Page or Login Form is very important to developing a web application or desktop application.

If you want to develop a web application or desktop application, First of All, you need to develop a Login Page with Database.

I don’t confirm what are you using in programming to develop applications, but must make a Login Page. Then you will redirect to Main Application Page.

So, If you have ideas about Make a Login Form with the help of Any Programming Language Such as PHP, C#, Python, and Java that’s great.


In this article, you will get a login Form in PHP with database source code, the complete project is attached in the Zipping file. You just need to download the project and review it. After that, you will get more ideas about the Login Form in PHP and MySQL.

Basically, more beginners in PHP programming language, are facing many problems to develop any web application or web with a Database.

So, I recommend they Download any PHP project with a Database. After that, they get ideas on it.

Login Page in PHP with Database Source Code

I will share Login Page in PHP with Database Source Code below, you need to download it. After downloading this project you need to extract it.

After Extracting the Login Page in PHP Project you can see many files with Extensions PHP, CSS3, and Database File.


You need to Copy the Complete Folder without SQL File and Paste it into htdoc Folder. After that you need to import the Database, First of All, go to MySQL Create a Database with Login Name, and Import the Login Database that’s it.

However, these are all about Login Pages in PHP and MySQL with the Source Code Project. The project will help you to make a new Login Form with a different design. I hope you understand as well. If you have any questions/suggestions about this topic, kindly comment on me in below comment section. After receiving your Email or Comment I will contact you very soon.

Login Page in HTML With CSS Code

Recently, I made a video tutorial to design the Login Form in PHP with the help of HTML5 and CSS3. If you want to learn How Can You Design Login Page in PHP. I have shared below video tutorial you can learn it step by step.

After learning Login Form in PHP, you are able to use PHP and MySQL to Develop a Dynamically Login Form. I have also made the video tutorial, you can learn how can you develop a personal login form in Php MySQL Database.

<!DOCTYPE html>
	<title> Login Form in HTML5 and CSS3</title>
	<link rel="stylesheet" a href="css\style.css">
	<link rel="stylesheet" a href="css\font-awesome.min.css">
	<div class="container">
	<img src="image/login.png"/>
		<form method='POST' action='#'>
			<div class="form-input">
				<input type="text" name="text" placeholder="Enter the User Name"/>	
			<div class="form-input">
				<input type="password" name="password" placeholder="password"/>
			<input type="submit" type="submit" value="LOGIN" class="btn-login"/>

Above mentioned code represents the login form page using HTML, you need to use CSS3 to design that, I’ve mentioned code on below you can use that to the design the login form.

	margin: 0 auto;
	background-image: url("../image/technology.jpg");
	background-repeat: no-repeat;
	background-size: 100% 720px;

	width: 500px;
	height: 450px;
	text-align: center;
	margin: 0 auto;
	background-color: rgba(44, 62, 80,0.7);
	margin-top: 160px;

.container img{
	width: 150px;
	height: 150px;
	margin-top: -60px;

	margin-top: 30px;
	height: 45px;
	width: 300px;
	font-size: 18px;
	margin-bottom: 20px;
	background-color: #fff;
	padding-left: 40px;

	content: "\f007";
	font-family: "FontAwesome";
	padding-left: 07px;
	padding-top: 40px;
	position: absolute;
	font-size: 35px;
	color: #2980b9; 

	content: "\f023";

	padding: 15px 25px;
	border: none;
	background-color: #27ae60;
	color: #fff;

How to Develop Login in PHP with MySQL Database

Above mentioned codes are for designing login forms using HTML and CSS3, I’ve mentioned below the code that helps you to connect Php and MySQLi and also you can use that to make a login page in PHP.




    $sql="select * from loginform where user='".$uname."'AND Pass='".$password."' limit 1";
        echo " You Have Successfully Logged in";
        echo " You Have Entered Incorrect Password";

If you want to get the source of the project, I’ve mentioned a downloadable link. That helps you download the source code of the project.

The above mentioned have a login page in Php with source code, you can download the above-mentioned project. I’ve mentioned the download link below, you can easily follow that to download it.

I’ve also mentioned another login page in PHP with the source below, you can also download it on your computer.

above mentioned have a different login page in PHP with source codes. I’ve also designed another helpful project that helps you to understand the login page in PHP with database and validation.

Login page in PHP with Database and Validation

However, I hope you liked the above-mentioned projects If you want to learn advanced registration and login forms in PHP and MySQL. I’ve also made a tutorial on this topic, you can watch the tutorial below.

Once you learned it, I hope you will understand everything from scratch.

Furthermore, In this article have many projects that help you to work on the Login page in PHP, I also mentioned the registration and login form in Php and MySQL. If you want to create a login page in PHP and MySQL with the session.

I’ve also made a tutorial on this topic, you can watch a tutorial below to understand How to Create Login Page in Php and MySQL with Session.

Create a Login Page in PHP and MySQL with the Session

You May Also Like: Complaint Management System in PHP

Thanks for Visiting and Reading the Complete Article, I hope this project is helpful and beneficial for you. Kindly share the project with personal friends on Social Media Networks and Also Subscribe to the Email for Getting Updates on My Website.

Thanks for Visiting and Watching the Complete video. I hope you have learned as well. Kindly, share my content/course on social networks. If you have any questions/suggestions about this topic, kindly submit a single comment or email me.

I will reply with your answer for a maximum of 24 hours. A subscriber to my Social Networks Pages and Emails to get updates. Thanks for the read and watching my video Tutorial.

Previous articleComplaint Management System Project in PHP MySQL
Next articleSales and Inventory System in PHP/MySQL with Source Code
I'm Programmer, Digital Marketer, and Blogger, I have been working on the web for 04 years. Basically, I have been sharing personal expertise on my website.



Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.