<?php require_once('auth.class.php'); require_once('db.inc.php'); $auth= new UserAuth($database); if (!$auth->Check_Auth()){ header('location: login.php');//bad auth!! exit; } ?>