num_rows > 0) { $_SESSION['username'] = $data['username']; $_SESSION['password'] = $data['password']; header('Location: http://localhost:8080/index.php/'); } else { $login_error = "Username o password errati"; $_SESSION['login_error'] = $login_error; header('Location: http://localhost:8080/form.php/'); } exit(); } } ?>