SESSION Array problem - possibly different PHP versions?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All, 

I have a problem that only occurs on our live server and not our local
server.

It works fine locally.

Basically I am using a session array to store values of product colours. A
user can add colours to the session array.

The session is defined as follows:

$_SESSION['color'][$counter] = $color;

Obviously the first time we validate and the $counter is set to 0.

When more colours are added the $counter variable increments and should
increment the value of the array.

The colours are added through a popup window. Before I open the popup window
I print_r($_SESSION['color']) to view the contents of the array and make
sure that they are valid and it is an array.

Output is as follows: 

[color] => Array ( [0] => #339933 [1] => #cccc00 ) etc...



Then once the popup opens I do the same print_r 

And it now shows: [color] => #339933 

There fore it isn't an array of colors within the session array. How can PHP
change this? Also the strange thing is that locally it works fine but not
live. So I am guessing that there is a problem with a certain version of
PHP?

Also Im not sure what else could be causing this problem?

Any ideas or hints would be appreciated.

Thanks




Kind regards, 
Angelo Zanetti 
Application Developer 	
________________________________


Web: http://www.elemental.co.za 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux