note 105148 deleted from function.setcookie by danbrown

From: Date: Mon, 01 Aug 2011 13:51:02 +0000
Subject: note 105148 deleted from function.setcookie by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-182059@lists.php.net to get a copy of this message
Note Submitter: Lee J Haywood ---- setcookie() breaks on PHP 4 if you attempt to pass the extra $httponly parameter (introduced in PHP 5) - i.e. no cookie is set at all, even if the parameter is set to false. <?php if ( version_compare( PHP_VERSION, '5.0.0', '<' ) ) { setcookie( /* pass 6 parameters */ ) } else { setcookie( /* pass 7 parameters */ ) } ?>

« previous php.notes (#182059) next »