I am trying to set the secure cookie into localhost and it doesn't work for me. My code is below :
<?php
setcookie("TestCookie", "value1hostonly", time(), "/", "localhost.com", 0, true);
setcookie("TestCookie2", "value2subdom", time(), "/", "localhost", 0, true);
echo @$_COOKIE["TestCookie"];
echo @$_COOKIE["TestCookie2"];
?>
Output always show blank . Please guide me.