PHP 3
PHP 3
html
<html>
<head>
</head>
<body>
<div id = "frm">
<h1>Login</h1>
<p>
</p>
<p>
</p>
<p>
</p>
</form>
</div>
<script>
function validation()
var id=document.f1.user.value;
if(id.length=="" && ps.length=="") {
return false;
else
if(id.length=="") {
return false;
if (ps.length=="") {
return false;
</script>
</body>
</html>
Style.css
body{
background: #eee;
#frm{
width:25%;
border-radius: 2px;
padding: 50px;
#btn{
color: #fff;
background: #337ab7;
padding: 7px;
margin-left: 70%;
Connection .php
<?php
$host = "localhost";
$user = "root";
$password = '';
$db_name = "nithin";
if(mysqli_connect_errno()) {
?>
Authentication.php
<?php
include('connection.php');
$username = $_POST['user'];
$password = $_POST['pass'];
$username = stripcslashes($username);
$password = stripcslashes($password);
$sql = "select *from login where username = '$username' and password = '$password'";
$count = mysqli_num_rows($result);
if($count == 1){
else{
?>