The Easiest Way to Save and Share Code Snippets on the web

Session Cookie Domain

php-brief

posted: Nov, 29th 2011 | jump to bottom

<?php
 
ini_set('session.cookie_domain','.fastmarcas.com');
 
session_set_cookie_params(false);
 
session_start();
 
if(!isset($_SESSION['cookie_domain']) && isset($_GET['cookie_domain']))
	$_SESSION['cookie_domain'] = 'Teste';
 
echo '<pre>';
print_r($_SESSION);
113 views