Link to home
Start Free TrialLog in
Avatar of Erie_Laker
Erie_Laker

asked on

Any way to "share" PHP session variables between two domains?

We have two websites featuring two aspects of our business: metrology and robotics. As these two are related, we have many links between these two sites, and they are designed to work seamlessly - they even look similar.
We don't have any LOG IN forms on either one of the sites, but, we have "quote request" forms for different items. Many times, a customer will fill out their info in one of the forms and request the quote, I would save their contact info in PHP session variables and when they move onto another quote request during the same visit, their contact info is pre-filled in the form.  It is convenient to the customer, but...

but, of course, once they leave one site and go to our other site, the session variables are lost.

Is there any way to retain the session variables values between two sites?
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

No, not without explicitly transferring them.  You would have to read them all and pass them via a POST to the other site.

The other choice is to put all that in a database which you can share between sites.  You would have to come up with another way to track the customer but that's doable.
Avatar of Erie_Laker
Erie_Laker

ASKER

@Dave
"The other choice is to put all that in a database which you can share between sites.  You would have to come up with another way to track the customer but that's doable."

Could you please explain how?
ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial