|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-09 19:34 UTC] iliaa@php.net
[2004-05-17 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 14:00:01 2025 UTC |
Description: ------------ I wanted to encode some data to be used later through the base64_encode and the base64_decode functions ... I took some variables and encoded it, then when I want to decode these data to display it, I found that it doesn't exist or can't be decoded ... Reproduce code: --------------- function docookie($setuid, $setusername, $setpass, $setstorynum, $setumode, $setuorder, $setthold, $setnoscore, $setublockon, $settheme, $setcommentmax) { $info = base64_encode("$setuid:$setusername:$setpass:$setstorynum:$setumode:$setuorder:$setthold:$setnoscore:$setublockon:$settheme:$setcommentmax"); } function cookiedecode($user) { global $user, $cookie; $user = base64_decode($user); $cookie = explode(":", $user); } Expected result: ---------------- variable $cookie[1] should contain the username entered Actual result: -------------- $cookie is empty .. doesn't contain any encoded or decoded data