maybe
if($_SESSION['LoggeIn'] .. instead of if(Session...
Indeed and he also forgot to use upper case null (NULL) along with the strictly not equal to match only the NULL although in some server setup's this is not necessary. So the corrected code will be as follows:
<?php
session_start();
// makes an array
$colors=array('red', 'yellow', 'blue');
// adds it to our session
$_SESSION['color']=$colors;
$_SESSION['size']='small';
$_SESSION['shape']='round';
$_SESSION['diameter']='10cm';
print "Done";
function fnCheckSession(){
if ($_SESSION['LoggedIn'] !==NULL)
echo "Session variable exist.";
else
echo "Session variable does not exist.";
}
fnCheckSession();
?>
cwarn23
Occupation: Genius
3,033 posts since Sep 2007
Reputation Points: 413
Solved Threads: 259