|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2000-11-01 11:05 UTC] sniper@php.net
[2000-12-07 11:34 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 20 19:00:01 2025 UTC |
I have similar problem: I am using php 4.0.1 pl 2, and redhat 2.2.16 with mysql 3.23.xx. My problem is that I am losing some values when I set cookie using array. for example: in file: loginAction.php setcookie ("s_cookie[0]","0",time()+3600,"/"); setcookie ("s_cookie[1]","1",time()+3600,"/"); setcookie ("s_cookie[2]","2",time()+3600,"/"); setcookie ("s_cookie[7]","7",time()+3600,"/"); in file: nSessionAction.php setcookie ("s_cookie[3]","3",time()+3600,"/"); setcookie ("s_cookie[4]","4",time()+3600,"/"); setcookie ("s_cookie[5]","5",time()+3600,"/"); setcookie ("s_cookie[6]","6",time()+3600,"/"); updateUserSession($s_cook); in file: functions.php function updateUserSession($s_cook){ for($index=0;$index< count($s_cook);$index++){ echo $s_cook[$index] . "x"; } } The output I get is as follows: run #1: 0x1x2xx4xxxx run #2: 0x1x2x3xxxxx run #3: 0x1x2xxxxx0x output changes randomly, though the order of loosing is similar after shutting down the browser and starting it again. This happens on both Netscape 4.74 and IE 5.0. in IE5 for mac, I can see the cookies are in right order and have right values. I have followed the example in php professional programming.