I'm registering a variable in a session (user name), and trying to access it on every page. I've done this before in other websites, without issue. Now, when you log in, it will say, "Logged in as username." But, when you reload the page, it says that you aren't logged in. The real twist is, if you reload again, sometimes it will say that you are logged in again. And this happens on every page. It sometimes remembers the variable, and sometimes it doesn't.
I've tried the following code:
session_start();
session_register("uname");
echo "Logged in as: " . $uname
I've also tried it without the session_start first.
Any thoughts?