Problem, I want to use sessions, but I am having issues with implementing sessions from my $food array such that if the user has selected a Pizza, I don't offer him or her a sandwich, likewise if the user selects a Sandwitch, I don't offer the user a Pizza.
I also want to know if the user has already selected a Pizza or Sandwich.
$food = array("Pizza" => $_POST["pepperoni"], "Sandwitch"=>$_POST["chickensandwitch"]);
//How do I set up each $food element such that it gets its own session?
// In addition to checking if $food["Pizza"] has been selected or not?
if (isset($_SESSION('$food["Pizza"]')))
{
$_SESSION('$food["Pizza"]') = $_SESSION('$food["Pizza"]')
echo "You have already selected Pepperoni";
}
else
{
echo "Please select a Pizza";
}
PS, with regards to the structure of the above code, and syntax I know there are numerous problems, that's why I am asking for help, thank you for not flaming, the Newb.