I am trying to combine two IF statements.
the FIRST statement checks if the cart if empty.
if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1)
The SECOND statement change if the user is login in or not...
if ($_SESSION['User']['AccessLvl'] == null)
I need to check if the cart is empty and if it is I have echo a message saying. cart if empty at the same thing i need to change if the user is login and if they is i dont want to show a form which I have and if they are not, they form should show.
I tried this but didn't work
if (!isset($_SESSION["cart_array"]) || count($_SESSION["cart_array"]) < 1) {
echo 'cart if emepy';
if ($_SESSION['User']['AccessLvl'] == null) {
}
}
else{
echo ' <form name="login" action="login.php"></form>';
}
summary The first statement checks if they is anything in cart and if they is nothing, the form should not show. IF the user is logged in the form should not show if they is anything in the cart because the form is a login in form and they is no point for the person to log in twice... The second if statement is statement that i used to check if someone is logged in or not