variables - Access PHP Object from a loaded PHP in POST requestGet the 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();
$_SESSION['obj'] = $obj;
And on other.php
$obj = $_SESSION['obj'];
and you can use the object.
Share solution ↓
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.
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.