A im writing a simple script in PHP with few files, in 'loginForm.php' I have code:
<?php
session_start();
$login = $_GET['login'];
$password = $_GET['password'];
$remember = $_GET['remember'];
include_once("login.php");
$userAccount = new UserAccount($login, $password);
$logged = $userAccount -> isLogged();
(...)
and in file 'photo.php':
global $userAccount;
$login = $userAccount -> getLogin();
what gives mi an error:
Call to a member function getLogin() on a non-object
I also tried with $GLOBALS - same result.