variables - Access PHP Object from a loaded PHP in POST request

Solution:
You can store it in the$_SESSION
and access it on the other pages.
On each page that you will use it you have to include the class.
So on both main.php and other.php:
require 'thisClass.php';
session_start();
On main.php
$_SESSION['obj'] = $obj;
And on other.php
$obj = $_SESSION['obj'];
and you can use the object.
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: installation failed, reverting ./composer.json and ./composer.lock to their original content.
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.