Cannot to update session data in php?
<p>I cannot update data which is stored in session. 
following is my code:</p>

<pre><code>session_start();
$_SESSION['test'] = 1;
</code></pre>

<p>to create a session. then I click a button call a function which on another php page;</p>

<pre><code>if(isset($_SESSION['test'])){
echo $_SESSION['test'];
         $_SESSION['test']+=1;
}else{
    echo "no data";
}

echo $_SESSION['test'];
</code></pre>

<p>then here is the problem. I print the result first "$_SESSION['test'];" to see whether it was changed. but $_SESSION['test'] is always 1. It is never change. And second "$_SESSION['test']" was changed to 2.</p>

<p>Many thank.</p>
