authUser($_POST['user'],$_POST['password'])>0){ $_SESSION['admin_login']=$_POST['user']; header("location:{$configAppRoot}home.php"); } else{ $smarty->assign("error","Login and password doesn't match!"); } } $smarty->display("index.tpl"); ?>