I am trying for 8 hours to fix it, and this post doesn't help me: Allow php sessions to carry over to subdomains
I am losing my id session on a new sub.domains.com Here is the code: from sub.domains.com
if($postac['zalogowany'] == 0){ $postac = ""; $_SESSION['postac'] = 0; }
login.php from domena.com
if($doVariable == 'play' && $_POST['postac'] > 0) {
if($_GET['serv'] == 'cos')
$server = 'baza';
$_SESSION['postac'] = $_POST['postac'];
$zalogowany = $pdo->prepare("UPDATE postac set zalogowany = 1 where id=:postac");
$zalogowany->bindValue(':postac', $_SESSION['postac'], PDO::PARAM_STR);
$zalogowany->execute();
if($_GET['serv'] == 'play');
header("Location: http://sub.domains.com");
}