Using php session variable in different pages
<p>I created a session variable in a php page 'session1.php' as follows</p>

<pre><code>&lt;?php
session_start();
$_SESSION['name']="piklu";
?&gt;
</code></pre>

<p>now I want to access the session value in another page say 'session2.php'.i need suggestion for that.
what I have done in 'session2.php' is as follows.</p>

<pre><code>&lt;?php
include('session1.php');
echo $_SESSION['name'];
?&gt;
</code></pre>

<p>The above code is working but only when session1.php and session2.php doesn't contain any html tags.if it is then all html tags from 'session1.php' will be copied to 'session2.php'. Is there any other way to do that?</p>
