Setting a cookie with a domain restriction
<?php setcookie('flavor','chocolate','','','.example.com'); setcookie('flavor','chocolate','','','j.example.com'); ?>