0% found this document useful (0 votes)
2 views1 page

Project2 With Code

The document outlines a simple login system project named 'Login System (Friend)'. It includes instructions to start XAMPP and provides HTML and PHP code for a login form and authentication process. The PHP script connects to a MySQL database to verify user credentials and returns a success or invalid message based on the login attempt.

Uploaded by

anabiyamishikhan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views1 page

Project2 With Code

The document outlines a simple login system project named 'Login System (Friend)'. It includes instructions to start XAMPP and provides HTML and PHP code for a login form and authentication process. The PHP script connects to a MySQL database to verify user credentials and returns a success or invalid message based on the login attempt.

Uploaded by

anabiyamishikhan
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Login System

Project Name

Login System (Friend)

Step 1

Start XAMPP → Apache + MySQL

HTML Code ([Link])


<!DOCTYPE html>
<html>
<body>
<form action="[Link]" method="POST">
<input type="email" name="email">
<input type="password" name="password">
<button>Login</button>
</form>
</body>
</html>

PHP Code ([Link])


<?php
$conn=mysqli_connect("localhost","root","","login_system");
$email=$_POST['email'];
$password=$_POST['password'];
$result=mysqli_query($conn,"SELECT * FROM users WHERE email='$email' AND password='$password'");
if(mysqli_num_rows($result)>0){
echo "Login Success";
}else{
echo "Invalid";
}
?>

You might also like