Cześć.. Mam problem - Otóż, nie wiem co napisałem źle, ale gdy wprowadzam dane do formularza logowania - on niestety nie działa. Prosiłbym o pomoc.
Kod:
<?php
//include config
require_once('../includes/config.php');
//check if already logged in
if( $user->is_logged_in() ){ header('Location: index.php'); } ?>
<!doctype html>
<link rel="stylesheet" href="../style/normalize.css"> <link rel="stylesheet" href="../style/main.css">
<?php
//process login form if submitted
if(isset($_POST['submit'])){
$username = trim($_POST['username']); $password = trim($_POST['password']);
if($user->login($username,$password)){
//logged in return to index page
header('Location: index.php');
} else {
$message = '<p class="error">Wrong username or password</p>';
}
}//end if submit
?>
<form action="" method="post">