echo "Location: $location<br>"; echo "Session: ".$_SESSION['location']."<br>"; $_SESSION['location'] = ""; echo "Location: $location<br>";
Which produces the output:
Location: main.php Session: main.php Location:
Why is this happening? The only reason I can think of is that when I use the assignment operator, it's assigning a reference. But I didn't think php did that.
How can I get it so that I take the value out of the session, but store it in a temporary variable?