I am fairly new to web programming, I have mainly used java to create desktop applications in the past.
I\'m trying to figure out how to create persistent objects in
Though it may not be the prettiest solution, but you can use SESSIONS for this matter.
class SomeObject{
public function __costructor{
$_SESSION['object'] = serialize($this);
}
}
and on another page, you can call the object simply with:
$object = unserialize($_SESSION['object']);
Though ofcourse this approach seems the easiest. It should come with utmost precaution:
Know that sessions depending on the traffic of your server should not be too large in size as many users concurrently ask for each of these sessions. Scale the size at your own discretion.
always serialize and unserialize as sessions not done so will misbehave.
What ever sails your boat. Do so at your own mindful analyzation. goodluck