session variables loses its values

Forum for you who has PHP installation issues

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 12
Joined: Sun Jan 26, 2003 2:57 pm
Location: Sweden

Thu May 01, 2003 5:30 am


I think I have got some problems with the configuration files or something. If I start a session, registers a variable and gives it a value. Later when I try to get the value from the session variable it is empty.
Here's a simple counter that should be enumerated every time key-button F5 is pressed. But it keeps printing Hello 0 every time. Have tried it on other computers and it works but on my computers it wont work. Would be thankful if someone could please help me. Thanks in advance!

Code: Select all

   // start a session if there aren't an existing one
   if (!isset($_SESSION['count']))
      $_SESSION['count'] = 0;
   echo "Hello " .$_SESSION['count'];

User avatar
Posts: 1240
Joined: Thu Jun 20, 2002 10:14 pm
Location: Ukraine, Crimea, Simferopol

Tue May 06, 2003 5:19 am

Try to see php.ini
"Sex,Drugs and Rock&Roll " replaced at "Sucks,Bugs and Plug&Play";

Post Reply