I am trying to store a value obtained from a URL variable into a SESSION variable.
Here is the URL:
<a href="webpage.php?store=<?php echo 'Ace'; ?>">Ace Hardware</a>
Here is the SESSION coding, which retrieves the variable, but loses the variable value upon leaving the page.
$_SESSION["store"] = $_GET["store"];
$shopByStore = $_SESSION["store"];
If I plug in the value in quotes as it is below (see "Ace" in code below), it works. But it doesn't work in the code above using the GET method ($_GET["store"])
$_SESSION["store"] = "Ace";
$shopByStore = $_SESSION["store"];
session?