Home › Forums › Back End › PHP Session › Reply To: PHP Session
November 23, 2013 at 4:47 pm
#157003
__
Participant
If the two domains share a common parent (that you control), then you can configure the session cookie to apply to all your subdomains:
<?php
// these are simply the default values;
// we have to include them in order to set the $domain argument
$ttl = 0;
$path = '/';
// note the leading dot (.) in the domain
$domain = ".rathorint.com";
session_set_cookie_params( $ttl,$path,$domain );
session_start();