We help IT Professionals succeed at work.

Session Related Query

Mukesh jain
Mukesh jain asked
on
100 Views
Last Modified: 2018-01-17
My domain name is www.adaalo.com

when i try to login with www.adaalo.com its sucessfully login

but when i select city its convert to www.bangalore.adaalo.com 

that time session automatically destory
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
Take a look at session_set_cookie_params() - use it to set the default path for the session cookie (so it is valid across sub-domains)
<?php
session_start()
session_set_cookie_params(0, '/', '.adaalo.com'); 

Open in new window

Most Valuable Expert 2011
Author of the Year 2014
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2019

Commented:
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.