Hi Matt - thanks for answering. In all of the books I've checked no one makes the point that you can't combine $_SESSION and session_start().
I did not say to not use $SESSION with session_start(), you have no options there. I said, if you use session_register, or session_is_registered you should never use $SESSION and vise versa. I will try to locate some documentation on this.
I pasted your code into my page. The body just contains a link to reload the page.
This was my entire code, there is no body. You should not have pasted it anywhere but in a new document.
Notice: Undefined variable: count in X:\Websites\Slidetest\testsession.php on line 28
Notice: Undefined variable: value in X:\Websites\Slidetest\testsession.php on line 29
Count: 1
Value: 1
Array ( [0] => Array ( [0] => 1 [1] => 1 ) )
I would look into your server configuration and make sure that the variable register_globals in your php.ini file is set to ON. session_register does not work without register globals.
Also, this needs to be an associative array with count as the index, a string value of '1', '2', etc. The value variable should be incrementing from A to B to C but somewhere gets changed to 1.
This is exactly what it does. Here is the output from running this on my server and pressing the refresh button 9 times:
Array
(
[0] => Array
(
[0] => 1
[1] => A
)
[1] => Array
(
[0] => 2
[1] => B
)
[2] => Array
(
[0] => 3
[1] => C
)
[3] => Array
(
[0] => 4
[1] => D
)
[4] => Array
(
[0] => 5
[1] => E
)
[5] => Array
(
[0] => 6
[1] => F
)
[6] => Array
(
[0] => 7
[1] => G
)
[7] => Array
(
[0] => 8
[1] => H
)
[8] => Array
(
[0] => 9
[1] => I
)
[9] => Array
(
[0] => 10
[1] => J
)
)
There are other ways to build the array, this is merely an example and they way that I prefer. If this doesn't help, i'm sorry, I tried 🙂
Regards,
Matt