Login Web OOP

<?php

include_once ('all.php');
$logindata = new Databases;

session_start();
$error='';

if(isset($_POST['login']))
{
if(empty($_POST['username']) || empty($_POST['password']))
{
$error = "Username Or Password Is Empty";
}
else
{
$username=$_POST['username'];
$password=$_POST['password'];

$rows=$logindata->login($username,$password);

if($rows==1)
{
$_SESSION['login_user']=$username;
header('location:select.php');
}
else
{
$error="Invalid Username Or Password";
}

}
}

?>

0 comments:

Tweet Now !!

Recommend us on Google!