<?php // /login/login.php: Login process // author: Jonathan Roes <jroes@sosdg.org> include '../includes/common.inc'; $username = $_POST['username']; $password = $_POST['password']; if (isset($username, $password)) { if (authUser($username, $password)) { $_SESSION['username'] = $username; $_SESSION['password'] = $password; $tourl = $_POST['tourl']; if (!isset($tourl)) { header('Location: /login/home.php'); exit; } else { header('Location: ' . $tourl); } } } header('Location: /login/index.php?error=1'); ?>