[Solved] PHP Session ID issue [closed]


You have one fundamental problem:

if ( !isset( $_SESSION ) )
    $_SESSION = null;

if ( ( !is_array( $_SESSION ) ) xor ( !isset( $_SESSION['nzshpcrt_cart'] ) ) xor ( !$_SESSION ) )
    session_start();

You can’t access the session before it is started. Try starting it and then accessing it…

Also xor is a bitwise comparison…I’m not sure if that’s what your looking for here, maybe || is.

it seems like this session needs to set on first page load…does anyone know how to do that?

Normally first page load is denoted by the top of your script or whatever runs before outputting headers but since your new I’ll just say at the top. Try putting it there.

Most likely you are receiving an error and got display_errors off as such you get a blank page I reckon.

14

solved PHP Session ID issue [closed]