form_newlog
***************login.php***********
<?php
/*
$host="localhost";
$user="root";
$password="";
$db="demo";
mysql_connect($host,$user,$password);
mysql_select_db($db);
*/
$con =mysqli_connect("localhost","root","","siddharth");
if(isset($_POST['username'])){
$uname=$_POST['username'];
$password=$_POST['password'];
$sql="select * from loginform where user='".$uname."'AND Pass='".$password."' limit 1";
$result=mysql_query($sql);
if(mysql_num_rows($result)==1){
echo " You Have Successfully Logged in";
exit();
}
else{
echo " You Have Entered Incorrect Password";
exit();
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title> Login Form in HTML5 and CSS3</title>
<link rel="stylesheet" a href="stylesheet.css">
<link rel="stylesheet" a href="stylesheet.css">
</head>
<body>
<div class="container">
<img src="https://icons.getbootstrap.com/assets/icons/person-fill.svg"/>
<form>
<div class="form-input">
<input type="text" name="text" placeholder="Enter the User Name"/>
</div>
<div class="form-input">
<input type="password" name="password" placeholder="password"/>
</div>
<input type="submit" type="submit" value="LOGIN" class="btn-login"/>
</form>
</div>
</body>
</html>
***********stysheet******
body{
margin: 0 auto;
background-image: url("../image/technology.jpg");
background-repeat: no-repeat;
background-size: 100% 720px;
}
.container{
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;
}
input[type="text"],input[type="password"]{
margin-top: 30px;
height: 45px;
width: 300px;
font-size: 18px;
margin-bottom: 20px;
background-color: #fff;
padding-left: 40px;
}
.form-input::before{
content: "\f007";
font-family: "FontAwesome";
padding-left: 07px;
padding-top: 40px;
position: absolute;
font-size: 35px;
color: #2980b9;
}
.form-input:nth-child(2)::before{
content: "\f023";
}
.btn-login{
padding: 15px 25px;
border: none;
background-color: #27ae60;
color: #fff;
}
Comments
Post a Comment