Location: PHPKode > scripts > Login Script with PDO > login-script-with-pdo/login.php
<?php
require_once 'sys.class.php';

$login = new login;

$login->SetUsername("oran");
$login->SetPassword("dsfsdfsdfg");
$error = $login->CheckLogin(); 

echo $error;


 session_start();
if(isset($_SESSION['username']))
{
	
	echo "user {$_SESSION['username']} loged in  ";
}
else
{
	header('location: yourloginpage.com');
}
?>
Return current item: Login Script with PDO