I made a login system and set the user panel to the subdomain, but I can't get the session information in the subdomain.
My codes:
domain.com->login.php:
<?php
//Login Processes
ini_set('session.cookie_domain', '.domain.com' );
session_start();
$_SESSION["login"] = "ok";
$_SESSION["user"] = "wh1z";
header("Location: https://subdomain.domain.com")
?>
subdomain.domain.com->index.php:
<?php
if($_SESSION["login"]){
echo "Welcome, ".$_SESSION["user"];
}else{
echo "You Don't Have Permission";
}
?>