<?php ob_start(); include("config.php");if (isset ($_POST['login'])){ $num_rows = mysql_num_rows(mysql_query("SELECT * FROM championship__login WHERE username='" . $_POST['username'] . "' AND password='" . md5($_POST['password']) . "'")); if ($num_rows > 0) { session_start(); $_SESSION['loggedin'] = $_POST['username']; mysql_query("INSERT INTO `championship__online_users` SET `ip` = '" . $_SERVER['REMOTE_ADDR'] . "', `username` = '" . $_POST['username'] . "', `login_time` = '" . time() . "', `last_active` = '" . time() . "'"); header ('Location: index.php'); exit; } else { $message = "Invalid username and password combination or non-activated account.<br /><br />"; } }include("includes/header.tpl.php");include("includes/index_content.tpl.php");include("includes/footer.tpl.php");ob_end_flush();?>
session_start();