PHP 7 Script to Build a Login Form Using HTML5 and MySQL Database in Browser Full Project For Beginners

  • Post author:
  • Post category:PHP
  • Post comments:0 Comments


Welcome folks today in this blog post we will be building a login form using html5 and mysql database in browser using php 7. All the full source code of the application is shown below.




Get Started




In order to get started you need to make an index.php file and copy paste the following code







<h1> login form</h1><br><br><br><br>
<form action="" method="post">
<tr><td>ENTER YOUR USERNAME</td><td><input type="text" placeholder="username" name="usernameentered" required></td></tr>
<tr><td>ENTER YOUR PASSWORD</td><td><input type="password" placeholder="password" name="passwordentered" required></td></tr>
<tr><td><input type="submit" name="submit" value="submit"></td></tr>






$query1="SELECT * FROM LOGIN WHERE username='$a' && password='$b'";

$data1= mysqli_query($q,$query1); 

$t= mysqli_num_rows($data1);



 $_SESSION['user']=$a; echo "successful; 



 echo "failed";



Leave a Reply