Why is the PHP session NULL? why does the warning SESSION_START (); if ($ _ SESSION [aa] NULL) {echo & quot; NULL & quot ;;} else {echo & quot; non-empty & quot;} determines whether it is feasible? Do you want to attach an initial value? However, if I jump to another page and return, the initial value will be cleared. how can I solve this problem? --- Why does the PHP session not contain a value to determine whether it is null? a warning is reported.
SESSION_START ();
If ($ _ SESSION ['AA'] = NULL ){
Echo "null ";
} Else {
Echo "not empty ";
}
Is this true? Do you want to attach an initial value? However, if I jump to another page and return, the initial value will be cleared. how can I solve this problem?
------ Solution --------------------
Use isset or empty
Specifically, do you want to determine whether the variable exists or whether the content is null?
Will it be cleared when I jump to another page? Paste all codes