Location: PHPKode > scripts > Simple Event calendar > simple-event-calendar/admin/login.php
<?php
	session_start();
	include("../lib/config.php");
	include("../lib/functions.php");
	$obj = new eventcal();
	if(isset($_POST['submit']))
	{
		$admin = $_POST['admin'];
		$pass= $_POST['pass'];
		if( (ADMIN == $admin) && (PASSWORD == $pass))
		{
			$_SESSION['admin'] = $admin;
			header("location:mainpage.php");
		} 
		else
		{
			header("location:login.php");
		}
	}
		$obj->include_head();
?>
	<form action="" method="post">
		<table align="center" width="450">
			<tr><th colspan="2">Login</th></tr>
			<tr><td>Admin</td><td><input type="text" name="admin"></td></tr>
			<tr><td>Password</td><td><input type="password" name="pass"></td></tr>
			<tr><th colspan="2"><input type="submit" name="submit" value="Login"></th></tr>
		</table>
	</form>
<?php
	$obj->footer();
?>
Return current item: Simple Event calendar