I am using same login information for three sites at different hosting servers. I am using same database for three of them but i just want if i am login at one site and then move to second site then my i should be already loged in. how can i pass my session value from one site to other?

help me please.

Member Avatar for diafol

I don't think you can do that with $_SESSION, but I may be wrong. However, Google seems to be able to do it with all its different apps. How about saving login data in the DB and using that?

I came across this while searching "cross domain sessions php":

http://www.phpbuilder.com/columns/chriskings20001128.php3?page=2

You could serialize $_SESSION http://php.net/manual/en/function.serialize.php

encode it

call a get or post on the other site with the data.

then unserialize the data.

That would do exactly what you want to.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.