In this video we will learn how to connect HTML login form with PHP and MySQL database for login operation. If email and password match then user will get message login successfully other wise he or she will get message Invalid user name or password.

PHP and MySQL - How to create Login Form using HTML and Bootstrap v4.4 #1
https://youtu.be/O5YDHGcb3F0

To get the form data into the php file we need to specify php file name inside the opening tag of form with action=“login.php” login.php is a file name in the same directory where our html code is the next attribute is method=“post”. we have two method to send data to server get and post. For sending the sensitive information always use post method

For getting the input field value inside the php file we need to specify name of that input using name attribute of HTML

Now inside the login.php file write the following code
$email = $_POST[‘email’];
here $email is a variable we are getting email using $_POST global variable $_POST[‘email’]; here email is the name of input field

$con = new mysqli(“localhost”,“root”,“”,“test”);

$con is a variable which hold the $con object

#mysql

PHP and MySQL How to connect #HTML #login form to #PHP and #MySQL Part 2
2.15 GEEK