Dear friends
I am developing a php online registration form.I created login form which is without database becz admin user in only one to check enquiries.But some thing is wrrong here ..my login.php page code is below.
<!DOCTYPE html>
<html>
<head>
<title>Login page</title>
</head>
<center><h1>Admin Login</h1></center>
<center> <fieldset style="width: 30%; background-color: #F0FFF0"><br>
<body style="background-color: #A9A9A9">
<form method="post" >
Username:<input type="text" name="username" placeholder="username" /> <br></br>
Password:<input type="password" name="password" placeholder="********" /><br></br>
<input type="submit" name="login" value="login" /> <br></br>
</form>
</center>
</body>
</fieldset>
<p>Copyright 2013. National Industrial Group. All rights reserved.</p>
<center> <p>Last updated DEC 2014. by Softuniverse-Tech.</p></center>
<?php
if(isset($_POST['login'])){
$uname = filter_input(INPUT_POST, 'username', FILTER_SANITIZE_SPECIAL_CHARS);
$pword = filter_input(INPUT_POST, 'password', FILTER_SANITIZE_SPECIAL_CHARS);
if ($uname=="nitcoadmin" && $pword=="nitco@bahrain"){
//$_SESSION['user']=$uname;
//$_SESSION['passw']=$pword;
// $_SESSION['login']='1';
header('location:enqrep.php');
}
else
{
echo "<center>"."<p style='color: #FF0000'>"."Invalid username or password"."</p>"."</center> ";
}
}
?>
</html>
Warning: Cannot modify header information - headers already sent by (output started at /home/content/62/10830362/html/registration1/login.php:22) in /home/content/62/10830362/html/registration1/login.php on line 33
this error i got.