i'm trying to check if a session exist and has a specific value (2) to show a part of the website and if not it should return you to a other page.
So far i got this:
$_SESSION["deel"] = "2"; //set session deel to 2
$result = array("error" => false, "html" => null);
$result["error"] = false;
$result["html"] = "<h3>Session information:";
$result["html"] .= "<a href='/shop/?,69'>$_SESSION[class2C]</a>";
$result["html"] .= "</h3>";
after that we go to a other page:
if (!isset($_SESSION['deel']) || $_SESSION['deel'] == '2')
{ show the shit }
else
{ redirect }
However, it doesn't do anything and just shows me "the shit"
what am i doing wrong here?
Thanks in advance.