function allowed() { if (checkValidLogin()) { return; } Atomik::redirect('home'); return; }
<?php /* Another simple script. If someone is already logged in, but wanders to the login page, he is redirected to the admin home page */ Atomik::needed('logincheck'); if (checkValidLogin()) { Atomik::redirect('adminhome'); }
<?php /** * Created by PhpStorm. * User: Andreas * Date: 2/22/2016 * Time: 3:04 PM * */ $username = $_POST['Username']; $password = $_POST['Password']; include 'dbManipulation.php'; include "dbAccess.php"; checkValidLogin($username, $password);