Hi.
I'm trying to maintain an array of values across several pages using sessions.
At the header of my index.php I have the following code:
if( !isset( $SESSION['exists'] ) ){
echo "session did not exist";
session_name( GetHostByName( $REMOTE_ADDR ) );
session_start();
$SESSION['dcart'] = array();
$_SESSION['exists'] = 1;
}
Does that even make sense?
I have further down a few methods that are included from a seperate php file ( using include() ), that modify the array and that should print its contents. No deal however, it's like the array never gets played with.
I do know that session arrays should be accessed as $_SESSION['arrayname'][ index ];
Any hints/tips?
Thanks.
S