Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End PHP Session Reply To: PHP Session

#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();