note 35647 deleted from function.setcookie by cmb

From: Date: Sun, 10 Nov 2019 12:50:00 +0000
Subject: note 35647 deleted from function.setcookie by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-213005@lists.php.net to get a copy of this message
Note Submitter: dave at fubra dot com ---- There are several characters that dont work correctly if part of the cookie name, I in particular ran into problems using = as part of the cookie name ie/ <?php setcookie('dE4fR=', $foo); ?> this was as a result of base64_encode() ing a variable to use as the name. The cookie was being set fine but the = is stored as a little square character in the cookie which prevent proper retreival. The solution for me was to use md5() instead of base64_encode() but any other method which avoids the = sign should also solve the problem

« previous php.notes (#213005) next »