I have problems try to use html(login)->php1<->js(ajax)<->php2
I don't know how keep data in each session, i have a class in php2 that need to keep data in each call to the ajax.
The class is create in php1, but when is executed php, it does not exists.
Somebody know how keep the data charged in the class ?
session is better and easier.
I have used sessions.
 In php1 and php2, I have used session_start() at the beggining in both scripts, in php1 have declared $_SESSION['var'], but when I tried to use $_SESSION['var'] in php2 it doesn't not exists.
 In php1, I have declared:
$task = new Tasks();
Task is a class that is in other php3.
And in php1, I have defined some data in $task.
In php1 and php2, is declared:
But when php2 try to use that data in $task, it doesn't exists.
You have reason. Thanks.
I get a solution.
I used serialize in php1 (this code is executed once), and unserialize/serialize in php2 (this code is executed always, because I have a settimeout when I call the ajax in js)
I lost data because I save in $_SESSION['var'] = $task, without serialize
you have no idea what session can store?