Jump to content

Saving/Retrieving PHP object


victorsk

Recommended Posts

Hello,

 

I need to find a way on how to save a session and an object obtained in file1.php and use the session and object information in file2.php.

 

I cannot create a class and then instantiante it in file2.php because I am sending a SOAP request and with it I am getting that session and object information. 

There are subsequent other SOAP API functions that I need to call using session and object information obtained in file1.php so:

 

Step 1:

CheckAvailability (uses object obtained in file1)

onClick="load file2.php?parameter=some parameters

 

Step 2:

Add Product

onClick="load file3.php?parameter= some parameters"  <<< uses object/session information obtained from file1 and CheckAvailability

 

Step 3:

BookProduct

onclick="load file4.php?parameter=some parameters" <<< uses object/session information obtained file1 and CheckAvailability and Add Product

 

Clearly, re-using the same class at BookProduct part will be extremely inefficient because I have to call every previous procedure.

 

I hope I clearly defined my problem so it seems like the only way is to pass a resulting object/session from file to file as opposed to getting it from step 1.  So the basic Idea: at Step 3 use object's values obtained in Step1 + Step2.

 

Please help,

Thank you,

Victor.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.