how can i use a single account on my double sites.........either with cookies or any thing else...........!!

suppose i have http://www.mydomain.com and also
http://another.mydomain.com how can it use my single account with these both sites..........!!

Cookies and sessions won't work because they are separate domains so I would suggest having them both read a common mysql database where user data will be stored so when a user logs into each, their preferences+passwords will still be the same as the other site. If however you do not want the user to have to log in twice then when a user logs in record their ip address in the user database and when the user visits the second site, the second site will check if the users ip is in the database and if it is it will send a cookie.

Sorry if that is too brief but there is so much to explain in so fewer words...

but how google handles a single account for multiple sites.......!!

if i store cookies................do you think this should work........!!

Member Avatar for diafol

Why did you start another thread when you posted a similar one and didn't bother replying to it?

but how google handles a single account for multiple sites.......!!

Well cookies are designed to serve one domain only and google's login uses Java applets. So perhaps with googles login their Java applet could write to a file on the local system or something like that but this obviously doesn't suit your situation as you want php (The server side and not client side). Could you post your login script and show in a code box your database structure (column names and tables) as I shall help you code this multi site login.

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.