it was suggested to me that i use array_key_exists to check if a user was logged in instead of $_session...
so here's the example that i found on php.net
<?php
$search_array = array("first" => 1, "second" => 4);
if (array_key_exists("first", $search_array)) {
echo "The 'first' element is in the array";
}
?>
I'm not entirely sure of the structure here but here's what i came up with for my own code.
<?
$search_array = array("fname" => 1, "lname" => 2, "number" => 3, "id" => 5);
if (array_key_exists("fname", $search_array)) {
echo "The 'first' element is in the array";
}
?>