Greetings,
You are missing some } and the 3 } at the end are not needed.
PHP Code:
<?php
include("includes/function.php");
session_start();
if(isset($_POST['login']))
{
if(isset($_POST['username']))
{
if(isset($_POST['password']))
{
$username = $_POST['username'];
$query = mysql_query("select * from users where Username = '$username'") or die(mysql_error());
$user = mysql_fetch_array($query);
if(md5($_POST['password']) == $user['Password'])
{
echo "Login successful";
$_SESSION['user'] = $user['Username'];
header("Location: index.php");
}
else
{
echo "Please check you Login details";
include("login.php");
}
}
else
{
echo "Please check you password";
include("login.php");
}
}
else
{
echo "Please check your username";
include("login.php");
}
}
else
{
echo "Please check that you filled out the login form";
include("login.php");
}
?>
If when starting an if statement you start it like this;
then the { needs to be closed BEFORE any else, if an else is required.