I have a piece on information that I would like to show only one to user. Originally I was thinking that I could session but it doesn't seem to be working for me. Here's the code:
if ($_SESSION["info"] != "hide") { echo 'my note here'; $_SESSION["info"] = "hide"; }
What am I missing?
zzz wrote:...What am I missing?
...What am I missing?
session_star(), perhaps?
Used in conjunction with [man]session_start/man it should work.
I tested by putting
echo $_SESSION["info"];
above my code and see it shows 'hide'.
How can it show the value 'hide' when I set it later?
I did close the browser and opened it again to break the session.
😕
this page is a template include and I believe it's based on SMARTY. I'm ready to try something with cookies...