Java, .NET, PHP, PYTHON, ANGULAR, ML, Data Science, Testing, CI Tutorials in Easy Languages.

"Best Software Training, Internship, Project Development center of Indore India, Helpline 780506-3968"

Login Form Tutorials in PHP:-

1)First Create Table whose name will be admin and create userid and password field

 Insert Single row using the PHPMyAdmin Insert option.

2) Create a Login form design using login.php file

<!DOCTYPE html>
<h1>Login Form</h1>
<form action="adminlogin.php" method="post">
<input type="text" name="txtuser" placeholder="Enter username" />
<input type="password" name="txtpass" placeholder="Enter password" />
<input type="submit" name="btnsubmit" value="Login" />

3) Create Code for login.php file

$user = $_REQUEST['txtuser'];
$pass = $_REQUEST['txtpass'];
$ram =mysqli_connect('localhost','root','','php12batch');
$res = mysqli_query($ram,"select * from admin where userid='$user' and password='$pass'");
echo "incorrect userid and password";


Post a Comment

POST Answer of Questions and ASK to Doubt

Previous Post Next Post