Help me with Php session vs Header redirect?
<p>I have the following pages:</p>

<h3>page1.php</h3>

<pre><code>&lt;?php 
if (isset($_GET['link'])) { 
session_start(); 
$_session['myvariable'] = 'Hello World'; 
header('Location: http://' . $_SERVER['SERVER_NAME'] . dirname($_SERVER['REQUEST_URI']) . '/page2.php'); 
exit; 
} 
?&gt; 
&lt;a href="&lt;?php print $_SERVER['REQUEST_URI'] . '?link=yes';?&gt;"&gt;Click Here&lt;/a&gt;
</code></pre>

<h3>page2.php</h3>

<pre><code>&lt;?php 
print 'Here is page two, and my session variable: '; 
session_start(); 
print $_session['myvariable']; //This line could not output.
exit; 
?&gt;
</code></pre>

<p>When I try output <code>$_session['myvariable']</code> I did not get the result hello world message.</p>

<p>I could not find out the solution to fix it?</p>
